IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

2 Pages V   1 2 >  
Reply to this topicStart new topic
foobar2000 replaygain reference level seems low
aconverse
post Jul 29 2012, 01:09
Post #1





Group: Members
Posts: 19
Joined: 13-July 08
Member No.: 55753



The replaygain reference level in foobar2000 seems low.

I scanned http://replaygain.hydrogenaudio.org/proposal/ref_pink.wav from the original replaygain proposal, with a reference SPL of 89 dB. I was expecting to see a gain of +6 dB (as this file was supposed to generate +0 dB for 83 dB SPL). Instead I'm seeing +2.35 dB. Any ideas what's going on?

Go to the top of the page
+Quote Post
xnor
post Jul 29 2012, 01:29
Post #2





Group: Developer
Posts: 683
Joined: 29-April 11
From: Austria
Member No.: 90198



ReplayGain is not peak-normalization. Increase the gain on the Playback page (preamp) if you want less 'loss of volume' but check that you don't run into clipping (that's what the prevent clipping according to peak option is for).
Go to the top of the page
+Quote Post
aconverse
post Jul 29 2012, 01:49
Post #3





Group: Members
Posts: 19
Joined: 13-July 08
Member No.: 55753



I'm completely confused about how peak normalization and pre-amp relate to what I asked. I'm not even complaining about a loss of volume. The gain here is positive after all. The gain just isn't as large as the replaygain spec says it should be.

The replaygain spec says this file (-14 dB pink noise) should have a gain of +6 dB. Clipping is not a concern here because the file has 10.9 dB of head room. As shown in the screen shows foobar only computes a replaygain of +2.35 dB.
Go to the top of the page
+Quote Post
kode54
post Jul 29 2012, 01:54
Post #4





Group: Admin
Posts: 4618
Joined: 15-December 02
Member No.: 4082



The current ReplayGain scanner does not use the original ReplayGain algorithm any more. Instead, it uses the EBU R128 algorithm, converting the resulting LUFS 1:1 to a decibel offset to achieve a reference level of -18 LUFS.
Go to the top of the page
+Quote Post
xnor
post Jul 29 2012, 02:06
Post #5





Group: Developer
Posts: 683
Joined: 29-April 11
From: Austria
Member No.: 90198



I'm sorry aconverse, I completely misunderstood what you were asking.
Go to the top of the page
+Quote Post
aconverse
post Jul 29 2012, 02:07
Post #6





Group: Members
Posts: 19
Joined: 13-July 08
Member No.: 55753



Thanks kode54, that clears things up
Go to the top of the page
+Quote Post
xnor
post Jul 29 2012, 02:40
Post #7





Group: Developer
Posts: 683
Joined: 29-April 11
From: Austria
Member No.: 90198



Hmm but when using r128gain with the ref_pink file using the ReplayGain profile (-18 LUFS) the resulting file is boosted by 6 dB.

edit: hmm the result doesn't change if I change the target LUFS...

This post has been edited by xnor: Jul 29 2012, 02:41
Go to the top of the page
+Quote Post
kode54
post Jul 29 2012, 06:29
Post #8





Group: Admin
Posts: 4618
Joined: 15-December 02
Member No.: 4082



QUOTE (xnor @ Jul 28 2012, 18:40) *
using the ReplayGain profile

And when you do that, it uses libreplaygain to scan the file.
Go to the top of the page
+Quote Post
xnor
post Jul 29 2012, 11:49
Post #9





Group: Developer
Posts: 683
Joined: 29-April 11
From: Austria
Member No.: 90198



I see. When using EBU R128-2 it reports -23.4 LUFS for the ref_pink file.

QUOTE (kode54 @ Jul 29 2012, 02:54) *
Instead, it uses the EBU R128 algorithm, converting the resulting LUFS 1:1 to a decibel offset to achieve a reference level of -18 LUFS.


-18 - (-23.4) = +5.4 dB, no?




This post has been edited by xnor: Jul 29 2012, 20:13
Go to the top of the page
+Quote Post
kode54
post Jul 29 2012, 20:54
Post #10





Group: Admin
Posts: 4618
Joined: 15-December 02
Member No.: 4082



Maybe libebur128 needs some work, then. I found the same LUFS result with lib1770, regardless of using R128-1 or R128-2 mode.

lib1770 needs some work before it could be used in this scanner as well, as it doesn't support multi-threaded scanning, and my dodgy attempt to add that resulted in non-matching album gain levels.
Go to the top of the page
+Quote Post
xnor
post Jul 29 2012, 21:50
Post #11





Group: Developer
Posts: 683
Joined: 29-April 11
From: Austria
Member No.: 90198



R128-2 and -1 result in different LUFS here:

2:
[1/1] "ref_pink.wav": -23.4 LUFS (0.4 LU)

1:
[1/1] "ref_pink.wav": -23.5 LUFS (0.5 LU)


edit: I don't know much about R128/BS.1770 or the libraries that implement them. Just wondering why there's such a big difference in fb2k from the +6 or +5.4 dB.

edit2: I checked some music tracks and there the r128gain ebu r128-2 results line up fine with fb2k (referenced to -18 LUFS). Why wouldn't the ref_pink file?

edit3: The VST plugin 'AC-R128' measures the ref_pink file with -20.4 LUFS. So maybe it's just r128gain that's wrong.

This post has been edited by xnor: Jul 30 2012, 01:44
Go to the top of the page
+Quote Post
kode54
post Jul 30 2012, 07:08
Post #12





Group: Admin
Posts: 4618
Joined: 15-December 02
Member No.: 4082



I have modified a version of lib1770 which may be useful for testing with this or the example programs:

http://kode54.foobar2000.org/moo/lib1770.7z

  • I added a few _MSC_VER tests in various places to remove C99isms when compiling with MSVC.
  • I also added a multi-threaded interface in bs1770_ctx_m.*.
    • The API is identical to bs1770_ctx.*, with the addition of creating an instance for N tracks, adding samples to each track, collecting info for each track, and collecting info for the entire album set.
    • Function calls for adding samples and collecting the track LUFS or track LRA may be overlapped with other threads, as long as each track number is only operated on by a single thread at a time.
    • Function calls to collect album LUFS or album LRA operate on the object as a whole, and thus must not overlap with any other threads.
    • Due to how the object uses multiple stats collection objects instead of a single instance, all tracks must be flushed by collecting their LUFS or LRA output before collecting the album output.
    • Note that the album LRA function may be incorrectly implemented, as I only guessed that it would be safe to scan each track separately, then pick out the minimum and maximum levels from each.
    • It also assumes that the gate level for each album job should be collected by averaging the gate levels of each track. This seems to line up with libebur128 as far as scan results. Well, except for that one result on ref_pink.
Go to the top of the page
+Quote Post
Case
post Jul 30 2012, 16:33
Post #13





Group: Developer (Donating)
Posts: 2225
Joined: 19-October 01
From: Finland
Member No.: 322



That ref_pink file is mono, and for some reason R128Gain thinks it is half as loud as stereo file. foobar2000 scans mono files as stereo.
Go to the top of the page
+Quote Post
xnor
post Jul 30 2012, 18:59
Post #14





Group: Developer
Posts: 683
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE (Case @ Jul 30 2012, 17:33) *
That ref_pink file is mono, and for some reason R128Gain thinks it is half as loud as stereo file. foobar2000 scans mono files as stereo.

Indeed, that's the case, Case. Surprisingly even Adobe Audition has that behavior. +5.4 dB as mono, +2.4 dB as stereo.

I just discovered that R128Gain has an option for this: "--mono=on,--mono Don't treat mono as stereo." wink.gif This fixes things, but I'm wondering why this is 'force stereo' option is enabled by default.

edit: Maybe 'mono' means only the center channel is being used. But isn't it more common to play the mono files on the left and right channel (aka 'dual mono')?

edit2: libebur128 http://www.hydrogenaudio.org/forums/index....st&p=751044 wink.gif

This post has been edited by xnor: Jul 30 2012, 19:05
Go to the top of the page
+Quote Post
pbelkner
post Jul 31 2012, 07:08
Post #15





Group: Members
Posts: 412
Joined: 13-June 10
Member No.: 81467



QUOTE (xnor @ Jul 30 2012, 18:59) *
I just discovered that R128Gain has an option for this: "--mono=on,--mono Don't treat mono as stereo." wink.gif This fixes things, but I'm wondering why this is 'force stereo' option is enabled by default.

AFAIK this is not backed by EBU R128. The option was added because of user request.
Go to the top of the page
+Quote Post
xnor
post Jul 31 2012, 12:51
Post #16





Group: Developer
Posts: 683
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE (pbelkner @ Jul 31 2012, 08:08) *
AFAIK this is not backed by EBU R128. The option was added because of user request.

The r128 doc doesn't say much at all. It's based on ITU-R BS.1770, which is the technical standard for measuring loudness. 1770-2 definitely does mention mono (center channel) and dual mono (left and right channel).

This post has been edited by xnor: Jul 31 2012, 12:54
Go to the top of the page
+Quote Post
pbelkner
post Aug 17 2012, 22:19
Post #17





Group: Members
Posts: 412
Joined: 13-June 10
Member No.: 81467



QUOTE (kode54 @ Jul 30 2012, 07:08) *
I have modified a version of lib1770 which may be useful for testing with this or the example programs:

http://kode54.foobar2000.org/moo/lib1770.7z

There's a new version of "lib1770" available:
  • It should compile with MSVC (cf. "nmake.mak" in source folder "msvc").
  • Because of restructured code in order to avoid duplicated computations there's a performance boost of about 40%.
  • The library now supports parallel computations (cf. "example2.c"). Parallel computation may bring another 50% performance boost.
Go to the top of the page
+Quote Post
Martin F.
post May 4 2013, 23:36
Post #18





Group: Members
Posts: 125
Joined: 15-July 06
From: Germany
Member No.: 32930



QUOTE (kode54 @ Jul 29 2012, 02:54) *
The current ReplayGain scanner does not use the original ReplayGain algorithm any more. Instead, it uses the EBU R128 algorithm, converting the resulting LUFS 1:1 to a decibel offset to achieve a reference level of -18 LUFS.


Is it possible to change the value to match dBpoweramp’s default of −23 LUFS? I haven’t found a preference for that.


--------------------
FLAC.
Go to the top of the page
+Quote Post
kareha
post May 5 2013, 16:55
Post #19





Group: Members
Posts: 52
Joined: 1-September 11
Member No.: 93415



QUOTE (Martin F. @ May 4 2013, 23:36) *
QUOTE (kode54 @ Jul 29 2012, 02:54) *
The current ReplayGain scanner does not use the original ReplayGain algorithm any more. Instead, it uses the EBU R128 algorithm, converting the resulting LUFS 1:1 to a decibel offset to achieve a reference level of -18 LUFS.


Is it possible to change the value to match dBpoweramp’s default of −23 LUFS? I haven’t found a preference for that.


Is this the reason why foobar and dbpoweramp produce different RG values?
Go to the top of the page
+Quote Post
garym
post May 5 2013, 18:16
Post #20





Group: Members
Posts: 516
Joined: 16-September 06
From: United States
Member No.: 35261



QUOTE (kareha @ May 5 2013, 10:55) *
Is it possible to change the value to match dBpoweramp’s default of −23 LUFS? I haven’t found a preference for that.

Is this the reason why foobar and dbpoweramp produce different RG values?


Yes. In dbpa one can change the setting to -18 LUFS.
Go to the top of the page
+Quote Post
Sandrine
post May 6 2013, 10:55
Post #21





Group: Members
Posts: 319
Joined: 2-July 10
Member No.: 81991



Sorry to butt in with a really basic question: Since we're in a foobar2000 forum, I'm assuming you're using lib1770.dll in foobar2000. I can't find that file anywhere in my foobar2000 folders, though. How do you use it?
Go to the top of the page
+Quote Post
Case
post May 6 2013, 11:42
Post #22





Group: Developer (Donating)
Posts: 2225
Joined: 19-October 01
From: Finland
Member No.: 322



QUOTE (garym @ May 5 2013, 19:16) *
QUOTE (kareha @ May 5 2013, 10:55) *
Is it possible to change the value to match dBpoweramp’s default of −23 LUFS? I haven’t found a preference for that.

Is this the reason why foobar and dbpoweramp produce different RG values?


Yes. In dbpa one can change the setting to -18 LUFS.


I'm disappointed in Spoon. He should know better and not break standards.
Go to the top of the page
+Quote Post
Case
post May 6 2013, 11:45
Post #23





Group: Developer (Donating)
Posts: 2225
Joined: 19-October 01
From: Finland
Member No.: 322



QUOTE (Sandrine @ May 6 2013, 11:55) *
Sorry to butt in with a really basic question: Since we're in a foobar2000 forum, I'm assuming you're using lib1770.dll in foobar2000. I can't find that file anywhere in my foobar2000 folders, though. How do you use it?

Your assumption is incorrect. foobar2000 uses libebur128 with some speed optimizations.
Go to the top of the page
+Quote Post
Sandrine
post May 6 2013, 11:56
Post #24





Group: Members
Posts: 319
Joined: 2-July 10
Member No.: 81991



QUOTE (Case @ May 6 2013, 12:45) *
Your assumption is incorrect. foobar2000 uses https://github.com/jiixyj/libebur128"]libebur128[/url] with some speed optimizations.


Glad to know it's not me then but people posting unrelated info where it's confusing.
Go to the top of the page
+Quote Post
Martin F.
post May 6 2013, 22:26
Post #25





Group: Members
Posts: 125
Joined: 15-July 06
From: Germany
Member No.: 32930



QUOTE (Case @ May 6 2013, 12:42) *
QUOTE (garym @ May 5 2013, 19:16) *
QUOTE (kareha @ May 5 2013, 10:55) *
Is it possible to change the value to match dBpoweramp’s default of −23 LUFS? I haven’t found a preference for that.

Is this the reason why foobar and dbpoweramp produce different RG values?


Yes. In dbpa one can change the setting to -18 LUFS.


I'm disappointed in Spoon. He should know better and not break standards.


From this thread:
QUOTE (kode54 @ Aug 18 2012, 11:01) *
The proposed standard for Opus is R128 gain with a reference level of -23 LUFS.

From Loudness Metering: ‘EBU Mode’ metering to supplement loudness normalisation in accordance with EBU R 128:
QUOTE
For an ‘EBU Mode’ meter, the target loudness level shall be -23.0 LUFS = 0.0 LU (as defined in EBU R 128).


So dBpoweramp looks standard to me and that’s the reason I’d like to adjust foobar2000 rather than dBpoweramp.


--------------------
FLAC.
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
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: 21st September 2014 - 08:30