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: ReplayGain when converting 5.1 to 2 (Read 4459 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ReplayGain when converting 5.1 to 2

Quite usually I transcode surround AC-3 to stereo CBR MP3 at 160 Kb/s. I know transcoding from AC-3 to MP3 is bad idea, but compatibility and the size of product is reason why this is done. Also foobar2000 has great AC-3/DTS downmixer (optional component) and resulting product (Xvid/DivX) is best compromise for me.

However I was thinking about ReplayGain in this scenario. If I RG original source (surround AC-3), and do conversation (to stereo MP3) with RG applied what will I get? Also what will I get without applying RG? And at the end, I think RG processing is by no doubt - good thing to have it.

Example:
Code: [Select]
AC-3 source         : +8.71 dB
MP3 with RG applied : -4.13 dB
MP3 w/o RG applied  : +4.57 dB


I know what should I do - convert to MP3 then apply RG, but can someone provide quick easy peak into what's going on with provided example?

Thanks

ReplayGain when converting 5.1 to 2

Reply #1
I once tried to suggest creating a new standard and also tried to find out how exactly foobar's replay gain scanner works with multichannel files (but I didn't get a definitive answer):

Hydrogenaudio Forum > Scientific Discussion:
"Multichannel Replay Gain - Should a "proposed" standard for e.g. 5.1 exist?"
http://www.hydrogenaudio.org/forums/index....showtopic=77936

foobar2000 > Support - (fb2k)
"Replay Gain questions"
http://www.hydrogenaudio.org/forums/index....showtopic=77906

However, I was thinking about multichannel audio files, not video. Replay gain would be useless with long video files that are not played from playlists. It might make some sense with music videos if each track is stored in a separate video file (but AFAIK, no one has implemented replay gain for video).

Quote
AC-3 source: +8.71 dB
MP3 with RG applied: -4.13 dB
MP3 w/o RG applied: +4.57 dB

I am not going to comment the multichannel RG value, because there is no de facto standard for measuring it, but the value +4.71 dB is quite typical for a 2.0 movie soundtrack.

When you applied RG you made the "corrected" MP3 file about 8.7 dB louder than the original. Some loud passages in the soundtrack may now be somewhat clipped and possibly audibly distorded (unless the track actually didn't contain anything loud and thus it was possible to apply the gain without causing clipping).

ReplayGain when converting 5.1 to 2

Reply #2
I never use RG like "standard" on 5.1 files what I do is always analyse the RG info to see if the track reach the 1.00 peak value to decrease it [generally 4dB] and after I  increase it on the resulting file until it reach 1.00 peak value again...
Sorry for my bad english.

 

ReplayGain when converting 5.1 to 2

Reply #3
Replay gain would be useless with long video files that are not played from playlists. It might make some sense with music videos if each track is stored in a separate video file (but AFAIK, no one has implemented replay gain for video).

When you applied RG you made the "corrected" MP3 file about 8.7 dB louder than the original. Some loud passages in the soundtrack may now be somewhat clipped and possibly audibly distorded (unless the track actually didn't contain anything loud and thus it was possible to apply the gain without causing clipping).

I never use RG like "standard" on 5.1 files what I do is always analyse the RG info to see if the track reach the 1.00 peak value to decrease it [generally 4dB] and after I  increase it on the resulting file until it reach 1.00 peak value again...

I guess you are right and seems you are suggesting that "normalization" is better approach. I'll use Diow's tip in future. Thanks

5.1 to Stereo Downmixing overall scaling may well be done differently to what is fed into the Replay Gain function in order to reduce the likelihood of clipping in the downmixed signal (which isn't an issue to the floating-point RG function).

According sources for dsp_downmixer (PL2):

[font= "Lucida Console"]dmL = L + ?(1/2) * C + ?(2/3) * LS + ?(1/3) * RS + ?(1/2) * LFE
dmR = R + ?(1/2) * C - ?(1/3) * LS - ?(2/3) * RS + ?(1/2) * LFE[/font]

and foobar2000 scanner:

[font= "Lucida Console"]rgL = L + ?(1/2) * C + ?(1/2) * LS + LFE
rgR = R + ?(1/2) * C + ?(1/2) * RS + LFE[/font]

it seems impossible to check if RG results will match before and after conversion/downmixing as foobar2000 RG scanner formula can't be derived with any combination of dsp_downmixer coefficients. Well unless I use some other downmixer, of course