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.
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?
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 (http://www.hydrogenaudio.org/forums/index.php?showtopic=48058&view=findpost&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 (http://www.hydrogenaudio.org/forums/index.php?showtopic=48058&view=findpost&p=428279)
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.
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.
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.
Mp3 is a lossy format. If you want the output to be lossless try flac.
Thanks guys for the answers, things are more clear for me now.
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.
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.
Also, MP3Gain is limited to 1.5dB increments from what I remember.
Correct. It functions by altering the global gain scale factor, which is quantised to a resolution of 1.5 dB.