HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - Tech => Topic started by: masterChief on 2002-01-27 23:43:54

Title: Finding Quiet Parts of MP3 ??? PLZZZ
Post by: masterChief on 2002-01-27 23:43:54
I am working on a project and I need be able to detect the most quiet point in an MP3. I am new to understanding audio formats and would appreciate any help I can get!!!

The way I figure that I would have to do it is. Somehow decode the MP3 to PCM or WAV using LAME or something. And then some how analyze the wave form to programmatically find the point with the least amplitue. I don't know if this is the right direction or am I making things way to hard. If you know which direction I should go or know of a simple way to do this please respond. Any info at all will be greatly appreciated.

Thanks,
Chris
Title: Finding Quiet Parts of MP3 ??? PLZZZ
Post by: Jan S. on 2002-01-29 13:42:09
Most quiet part would porbably be silence.
Therefore you can't very well talk about the most quiet part of an audio file if you don't cut out all silence first.
Title: Finding Quiet Parts of MP3 ??? PLZZZ
Post by: petracci on 2002-01-29 15:02:24
Sounds like a job for Matlab to me...
Title: Finding Quiet Parts of MP3 ??? PLZZZ
Post by: masterChief on 2002-01-30 00:39:56
Well if there was a silent poing in the mp3 then I would consider that the most quiet point.  But if there is no absolute silence then I would need to detect the next best thing which is the most silent.. if you know what I mean??
Title: Finding Quiet Parts of MP3 ??? PLZZZ
Post by: Jan S. on 2002-01-30 10:54:09
Yeah.
But the point is that there will be no one point that is most silent.
I think nearly every audio file have silence and if that's the case there will be many exact points that are silent.

I think you best bet would ne an adio editor and go look after it your self.
That would never be exact though.




Jan.
Title: Finding Quiet Parts of MP3 ??? PLZZZ
Post by: petracci on 2002-01-30 13:48:02
Quote
Originally posted by Jansemanden
Yeah.
But the point is that there will be no one point that is most silent.
I think nearly every audio file have silence and if that's the case there will be many exact points that are silent.

I think you best bet would ne an adio editor and go look after it your self.
That would never be exact though.
Jan.


[advertisement on]
With Matlab you can load PCM files into a workspace, detect/eliminate the zero-valued elements and then search for the minimum (absolute) value...
[/advertisement off]
If it is only 1 MP3 you're talking 'bout, you can e-mail it to me and I'll check it for you....
Title: Finding Quiet Parts of MP3 ??? PLZZZ
Post by: ErikS on 2002-01-30 14:35:18
Quote
Originally posted by masterChief
The way I figure that I would have to do it is. Somehow decode the MP3 to PCM or WAV using LAME or something. And then some how analyze the wave form to programmatically find the point with the least amplitue. I don't know if this is the right direction or am I making things way to hard. If you know which direction I should go or know of a simple way to do this please respond. Any info at all will be greatly appreciated.


Sounds a bit simple actually... maybe you should try: calculate energy in the waveform (square all samples) and then average over a couple of samples (say 50 ms) to get a better value of how loud a particular passage is. Then just find minimum of that graph.

All can easily be done in matlab, but if you need really high speed, put some extra 10 min and write a c-program instead.

Take a look at www.replaygain.org (http://www.replaygain.org) for some matlab scripts and c-code. These also include a "equal loudness filter" which could be handy.

/Erik
Title: Finding Quiet Parts of MP3 ??? PLZZZ
Post by: Jan S. on 2002-01-30 19:03:36
I guess i better read up on things.