IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Replaygain Data
sundance
post Jul 1 2004, 07:44
Post #1





Group: Members
Posts: 166
Joined: 17-April 02
Member No.: 1804



Could anyone please explain, what those "peak" values mean and how they're interpreted during playback?

CODE
replaygain_track_gain = -9.01 dB
replaygain_track_peak = 1.092741
replaygain_album_gain = -9.58 dB
replaygain_album_peak = 1.220819


Btw., these come from Lenny Kravitz's album "Baptism". Yes, it's way to loud...

..:: sundance ::..
Go to the top of the page
+Quote Post
Garf
post Jul 1 2004, 08:01
Post #2


Server Admin


Group: Admin
Posts: 4884
Joined: 24-September 01
Member No.: 13



They are the maximum values of the output signal, 1.0 being full scale (the maximum).

This effectively means that the file needs to be reduced in volume before being able to be played back without clipping.
Go to the top of the page
+Quote Post
sundance
post Jul 1 2004, 08:15
Post #3





Group: Members
Posts: 166
Joined: 17-April 02
Member No.: 1804



Thanks for the reply, Garf.
But, to be honest, now I'm sort of confused. How can the maximum value be larger than full scale other than already being clipped? And if that would be the case, reducing the volume is void...
Go to the top of the page
+Quote Post
Sebastian Mares
post Jul 1 2004, 08:31
Post #4





Group: Members
Posts: 3629
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



AFAIK, ReplayGain is good for clipping introduces by the encoder. If the source (CD for example) was already clipped, lowering the volume will not get rid of the clipping, but it will be less audible.


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
magic75
post Jul 1 2004, 15:06
Post #5





Group: Members
Posts: 511
Joined: 2-December 02
Member No.: 3959



If we are dealing with lossy formats like MP3, the output of the MP3 decoder can very well be above 1.0, since its a lossy format. And since it is above 1.0 it gets clipped.

Now, I am also wondering if those peak values represent the peak value achieved without replaygain adjustment or if it is taken into consideration. From the values below I guess it is without adjustment...
Go to the top of the page
+Quote Post
Garf
post Jul 1 2004, 15:15
Post #6


Server Admin


Group: Admin
Posts: 4884
Joined: 24-September 01
Member No.: 13



Without adjustment.
Go to the top of the page
+Quote Post
sundance
post Jul 1 2004, 15:29
Post #7





Group: Members
Posts: 166
Joined: 17-April 02
Member No.: 1804



QUOTE
Without adjustment

So, what does that mean then:
If I playback that file (yes, it's an MP3 lame file) without replaygain (say with foobar), the output is clipped.
But if replaygain is enabled, is it
a) applied before the rendering takes place (thus results in an unclipped output) or
b) is the clipped output just lowered by some 9 dB (in this case)?

If b) is true it would make sense to apply mp3Gain to the file to force the renderer to use lower volumes right away?

[edit: typo]

This post has been edited by sundance: Jul 1 2004, 15:31
Go to the top of the page
+Quote Post
m0rbidini
post Jul 1 2004, 17:16
Post #8





Group: Members
Posts: 212
Joined: 1-October 01
From: Lisbon, Portugal
Member No.: 127



Taken from http://replaygain.hydrogenaudio.org/peak_data_format.html

QUOTE
Data Format
The maximum peak amplitude (a single value) should be stored as a 32-bit floating point number, where 1=digital full scale.

Uncompressed Files
Simply store the maximum absolute sample value held in the file (on any channel). The single sample value should be converted to a 32-bit float, such that digital full scale is equivalent to a value of 1.

Compressed files
Compressed audio does not exist as a waveform until it is decoded. Unfortunately, psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. However, it is likely that such values will be brought back within range after scaling by the replay level. Even so, it is necessary to store the peak value of a compressed file as a 32-bit floating-point representation, where +/-1 represent digital full scale, and values outside this range would usually clip.


I got curious and asked in #foobar2000 about this and Moneo and Peter Pawlowski said that two conditions must be satisfied in order to do this correctly;

1) decoder shouldn't clip by itself (solved by use of floatingpoint data, or int types that have range beyond normal sample range).
2) replaygain itself should operate at >16bit so last bits dont get discarded.

So the correct way of doing it is 'a)'. Unfortunately, the only player I know that satisfies these conditions out-of-the-box is foobar2000.

Cya
Go to the top of the page
+Quote Post
Kuuenbu
post Jul 7 2004, 20:03
Post #9





Group: Members
Posts: 65
Joined: 19-July 03
Member No.: 7864



QUOTE (Sebastian Mares @ Jul 1 2004, 02:31 AM)
AFAIK, ReplayGain is good for clipping introduces by the encoder. If the source (CD for example) was already clipped, lowering the volume will not get rid of the clipping, but it will be less audible.

Except the changes in peak values introduced by the encoding process are almost often so minimal as to be insignificant, thus the amount clipping introduced by the encoding proccess is pretty much a non-issue. You'd be lucky if you could get more than 3 samples over full-scale from a limited peak.

In fact, a lot of samples in the encoded clipped peak are actually ATTENUATED, which means that clipping in decoded MP3s is usally LESS than the original, even when at full-scale. Really, using ReplayGain to avoid/lessen clipping is rather pointless.


--------------------
www.loudnessrace.net
www.somethingawful.com
Go to the top of the page
+Quote Post
2Bdecided
post Jul 8 2004, 09:55
Post #10


ReplayGain developer


Group: Developer
Posts: 5110
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



I find most hard limited tracks which hit 0dB FS originally will clip when mp3 encoded.

Whether it's worth avoiding this kind of clipping is debatable - I'm not too bothered by it (as such tracks often sound pretty nasty already), but I'll remove it if I can. People have certainly ABXed it:

http://www.ff123.net/norm.html
http://www.ff123.net/mad.html
http://www.ff123.net/clipping.html

(some of these tests refer to the audibility of clipping which occurs for others reasons, but the first is about psychoacoustic coding)

Cheers,
David.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2014 - 22:59