r128gain icon indicating copy to clipboard operation
r128gain copied to clipboard

Incorrect loudness with true peak above 0dBTP

Open artemist opened this issue 1 year ago • 2 comments

I was testing r128gain with I Won the Loudness War by Dan Worrall, which has an integrated loudness of +2.3 LUFS. However, it is calculated as +1.9 LUFS when using r128gain.

I believe this is because r128gain tells ffmpeg to resample to 48kHz signed 16 bit stereo. The original audio is 44.1kHz and clips during resampling, reducing the maximum loudness.

This could be solved by removing the resample, though I am unsure what other effects that would have. Alternatively, the intermediate format could be switched to float. I have been able to get correct results with both methods.

artemist avatar Jul 21 '23 20:07 artemist

Can you upload the track you are referring to somewhere, so I can look at it?

desbma avatar Jul 22 '23 13:07 desbma

I don't want to upload the full song because of copyright, but I have a 30 second sample. I haven't put any loudness tags on this file so make sure to turn down your volume before playing it r128gain reports an integrated loudness of 1.8LUFS for this sample, while online tools and ffmpeg directly give a loudness of 2.1LUFS

artemist avatar Jul 24 '23 21:07 artemist