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: How is the 6ch replaygain value calculated? (Read 2765 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How is the 6ch replaygain value calculated?

How is the replaygain value calculated with 6ch files as source?

i have the following problem:
- 6ch source which has a RG value of -5 dB
- downmixed correctly to 2ch via behappy gives +0,5 dB

behappy uses a normalised downmix-matrix, wich i also use for 6ch playback in ffdshow. foobar uses this downmix matrix in the "downmix 5.1 to stereo" dsp, which isn't clipping-safe.

the above facts result in this dilemma:
- 2ch file is played back correctly in foobar
- 6ch original file, replaygained, downmix-dsp active, is played back about 5 dB louder with RG ON!
- 6ch original and 2ch are being played back correctly with ffdshow (at the same volume, because of the same matrices)
- if i apply aacgain to the 6ch file, it is played back 5 dB too low in ffdshow

i'm a bit frustrated with this right now. i want to have clipping-free music-dvd-backups, thus the aacgain, which play back at the same volume in foobar(if i want to listen to the music only, thanks to mp4) and in MPC+ffdshow.

hope everyone can follow my facts, if not, please don't hesitate to ask
member of the "i have a cat-avatar"-group ;)

How is the 6ch replaygain value calculated?

Reply #1
hm, noone who could help with this?
member of the "i have a cat-avatar"-group ;)

How is the 6ch replaygain value calculated?

Reply #2
A long time ago, someone (I think it was SamK) reported issues with ReplayGaining more than 2 channels. I didn't have chance to look in to it properly.

You have the added problem of the downmix(es). I don't know if there's a foobar specific way to change the down mix coefficients, but that might be a useful start.

As for RG of 5.1 material, a nasty work-around is to edit the ReplayGain values - maybe copying the stereo down-mix value into the 5.1 file.

Cheers,
David.

 

How is the 6ch replaygain value calculated?

Reply #3
I just tested how foobar2000 (0.9.5) calculates the ReplayGain values. It seems like every channel is scanned independently and the resulting RG value is the average of the channels' values. It is important to note that the LFE channel is ignored. So the RG values are properly calculated for multichannel files.

But the problem persists that these RG values are not representative after downmixing to stereo because of the increased dynamic range of the downmixed version. So the downmixed files will be played back at a lower volume than they should.

A feature could be implemented in the player to scan RG values with DSPs applied. That would be very useful for people that don't have a multi-speaker system and generally downmix multichannel material during playback.