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: Tool for evaluation of compressed audio (Read 3644 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Tool for evaluation of compressed audio

Hello,

I suppose that this matter has been discussed already somewhere here, but I might omitted it.
Is there a tool that can tell how much (relatively) a file has been dynamically compressed? For example by comparing of average to maximum (amplitude) value of the signal?
AFAIK replaygain use some similar approach, but can I use it (or use some other tool/method) to compare 2 files if one of them is already postprocessed by mp3gain?
For example, today I've listened to a remastered version of one album and I've had the feeling that it sounds louder then he original version. However I cannot be sure, because the original version that I have is in mp3 format and it is mp3gained. Also, I think that I feel less listening fatigue with the older version, but I might be wrong.

Thanks in advance.
Tony

Tool for evaluation of compressed audio

Reply #1
Quote
. However I cannot be sure, because the original version that I have is in mp3 format and it is mp3gained.
  Replay Gain doesn't directly change the audio level in the file.  It writes the Replay Gain value(s) into the file header/tag.  The playback software uses that data to set the playback level.  So, if you turn-off Replay Gain in your playback software, it will have no effect.

If you normalize/maximize both files, and then compare the average levels, that should give you an idea about the compresion.

Quote
Is there a tool that can tell how much (relatively) a file has been dynamically compressed? For example by comparing of average to maximum (amplitude) value of the signal?
  Do you have an audio editor? (i.e GoldWave, Audacity, Audition, etc?)    GoldWave can gvie you the peak and average levels, but it's slightly tricky.  I'm not sure about Audacity.  I don't have Audition, but I understand it can give this information as well as other file statistics.

 

Tool for evaluation of compressed audio

Reply #2
Don't normalize. The MP3 peaks can easily be 1-2db different from the true peaks.

In principle you could zero out all the mp3gain values by hand-editing the ReplayGain values to 0db in foobar and then re-applying MP3 gain. Then you can rescan RG to get a somewhat more accurate comparison.

Some of us have been working on the more general problem, but the tools available are a little half-baked...

http://www.hydrogenaudio.org/forums/index....showtopic=60502
http://www.hydrogenaudio.org/forums/index....showtopic=64013

Tool for evaluation of compressed audio

Reply #3
Quote
Don't normalize. The MP3 peaks can easily be 1-2db different from the true peaks.
But, if you don't normalize you might be comparing apples to oranges...  One of the files might simply be "louder" without being more compressed.  Another option, if you have the tools, is to measure the peak and average levels of both files.  The peak-to-average ratio* should be the same if both files have the same amount of compression, even if they are adjusted to different absolute levels.

* When working in dB (Logarithmic), simple subtraction gives you the ratio.    (If you reduce the peak level of a file by 3dB, the average is also reduced by 3dB....  The difference between the peak and average is constant as long as your processing is linear...  Compression is nonlinear.)

Tool for evaluation of compressed audio

Reply #4
That is only true if the encoder settings are exactly the same.

Let me put it to you another way. The peak value of a Spoon album I bought on iTunes is +5.38dbFS. Are you seriously saying that the AAC album has 5db more dynamic range than the same album on CD? Because that's exactly what normalizing is going to do.

Tool for evaluation of compressed audio

Reply #5
Quote
Is there a tool that can tell how much (relatively) a file has been dynamically compressed? For example by comparing of average to maximum (amplitude) value of the signal?
  Do you have an audio editor? (i.e GoldWave, Audacity, Audition, etc?)    GoldWave can gvie you the peak and average levels, but it's slightly tricky.  I'm not sure about Audacity.  I don't have Audition, but I understand it can give this information as well as other file statistics.

Yes, I remember that GoldWave has this feature. I was thinking about some command line tool, though. It's better for automation (scripting), you know.

Don't normalize. The MP3 peaks can easily be 1-2db different from the true peaks.

And maybe even more. So, that makes impossible to compare a mp3 to a wav file, I guess.

In principle you could zero out all the mp3gain values by hand-editing the ReplayGain values to 0db in foobar and then re-applying MP3 gain. Then you can rescan RG to get a somewhat more accurate comparison.


I don't get the point, sorry. If I zero out all the mp3gain values and then re-apply MP3gain, I will end with the same file as the initial one, am I wrong?
Anyhow,  thanks for the links, I'll check them out.

Quote
Don't normalize. The MP3 peaks can easily be 1-2db different from the true peaks.
But, if you don't normalize you might be comparing apples to oranges...  One of the files might simply be "louder" without being more compressed.  Another option, if you have the tools, is to measure the peak and average levels of both files.  The peak-to-average ratio* should be the same if both files have the same amount of compression, even if they are adjusted to different absolute levels.

* When working in dB (Logarithmic), simple subtraction gives you the ratio.    (If you reduce the peak level of a file by 3dB, the average is also reduced by 3dB....  The difference between the peak and average is constant as long as your processing is linear...  Compression is nonlinear.)

Thanks, that was my idea too. However, it doesn't seem to be very reliable method if one of the files is mp3, or even if both files are mp3 but coded with different codecs/settings.

However, what about comparing of AV to RMS values? In this way the artificial peaks of the mp3 would be masked, I guess.
Well, the question about a proper tool to compare these values still stands.

~

Tool for evaluation of compressed audio

Reply #6
Yes, I remember that GoldWave has this feature. I was thinking about some command line tool, though. It's better for automation (scripting), you know.

SoX is command-line and has stats that might be what you're looking for.
  -bandpass

Quote
$ sox track1.flac -n stat
Samples read:          15432648
Length (seconds):    174.973333
Scaled by:        2147483647.0
Maximum amplitude:    0.708801
Minimum amplitude:    -0.750977
Midline amplitude:    -0.021088
Mean    norm:          0.081288
Mean    amplitude:    0.000206
RMS    amplitude:    0.107014
Maximum delta:        0.535461
Minimum delta:        0.000000
Mean    delta:        0.039843
RMS    delta:        0.053264
Rough  frequency:        3493
Volume adjustment:        1.332

Tool for evaluation of compressed audio

Reply #7
And maybe even more. So, that makes impossible to compare a mp3 to a wav file, I guess.
From a strictly peak-to-average standpoint, absolutely.

Quote
I don't get the point, sorry. If I zero out all the mp3gain values and then re-apply MP3gain, I will end with the same file as the initial one, am I wrong? Anyhow,  thanks for the links, I'll check them out.
What I mean is, if you open the ReplayGain information in foobar2000 or whatever, and then manually force the track gain and album gain to 0, then apply the ReplayGain data to MP3 gain, the MP3 gain will be reset back to 0. Then you can rerun ReplayGain and get numbers that are not affected by existing MP3Gain values. (Hardly any other software uses MP3 gain fields anyway.)

Quote
Thanks, that was my idea too. However, it doesn't seem to be very reliable method if one of the files is mp3, or even if both files are mp3 but coded with different codecs/settings. However, what about comparing of AV to RMS values? In this way the artificial peaks of the mp3 would be masked, I guess.  Well, the question about a proper tool to compare these values still stands.
At that point you are basically close to having Chromatix's Sparklemeter