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: Why is peak affected by WAV -> MP3 -> WAV conversion? (Read 6121 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Why is peak affected by WAV -> MP3 -> WAV conversion?

I faced very strange issue, at least for me.
I have a wav file,
1)foobar2000 (I used 1.2.8) replaygain after scan said, it had track peak 0.994385 and that was OK
2) I converted this file to lame 3.99.5 mp3 using foobar2000 and replaygain said for the mp3 it had track peak 1.067684
3) then I converted mp3 to wav and got track peak 1.000000
4) I checked the mp3 file with another replaygain  tool (aimp 3.50) and got 1.00031 value

The question actually how wav -> mp3 conversion could affect peak track value so significantly?
Why mp3 - > wav conversion reduced peak track level? AFAIK it is lossless conversion operation?
Why different tool gives the different value for the same file and what hell is going on here actually?))

P.S.Check another wav from my collection with high (0.99) peak value and got the same kind of results.

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #1
Someone here recently mentioned that on lower bitrates, the mp3 encoder would mess with the volume to achieve better results. Maybe it comes from this? Which bitrate did you encode to?

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #2
MP3 encoding can introduce clipping (only apparent on decode, which is where replay gain levels are calculated):
See: http://www.hydrogenaudio.org/forums/index....st&p=428436
That's why you get a result > 1.

EDIT: For the answer to your second question re. "then I converted mp3 to wav and got track peak 1.000000":
See: http://www.hydrogenaudio.org/forums/index....st&p=428279

Quote
With fixed point data, 0dB FS, or “digital full scale” is the largest value you can store - anything bigger will be clipped to that largest possible value.

That's why when it's converted to fixed point 16bit PCM WAV it's = 1.


Read the 2 posts I linked to and that will explain everything you asked.

C.

EDIT: Added the answer to part 2.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #3
And about "why different tool gives the different value for the same file": it seems that AIMP clips the output of its decoder (or maybe its decoder clips itself). So AIMP gives incorrect result of track/album peaks.

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #4
As this does not reflect an issue with foobar2000 and is a general phenomenon associated with MP3, I have moved it to the relevant subforum.

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #5
Mp3 is a lossy format. If you want the output to be lossless try flac.

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #6
Thanks guys for the answers, things are more clear for me now.

Quote
Which bitrate did you encode to?
320

What is interesting, I actually tried mp3gain for the same file. Foobar2000, aimp and mp3gain gave me different values of gain, but took it easy now, just added in my favorite foobar2000 advanced limiter DSP effect, it causes small compression, but I like this way.

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #7
about replaygain value: foobar2000 now uses a new algorithm (based on R128), aimp has the bug you were told and mp3gain uses the classic replaygain algorithm.

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #8
Also, MP3Gain is limited to 1.5dB increments from what I remember.

 

Why is peak affected by WAV -> MP3 -> WAV conversion?

Reply #9
Correct. It functions by altering the global gain scale factor, which is quantised to a resolution of 1.5 dB.