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: Apply RelayGain when encoding (Nero AAC) (Read 4382 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Apply RelayGain when encoding (Nero AAC)

A question for the Nero Digital AAC developers, and a survey of interest from users.

Could an option be added to neroAacEnc to pass it a ReplayGain value, so that when the track is encoded, ReplayGain is 'applied' in a similar way to aacGain (i.e. 'losslessly')?

In this way, a ripped track could be scanned for its ReplayGain value, and that value passed to the encoder so that it's applied in one step. Also, Nero obviously know a lot about the AAC spec, and I've been concerned about problems I've read about aacGain. Also, the original amplitude ought to be recorded in a tag, in case the user wanted to reverse the operation (possibly by aacGain?).

Would anyone else appreciate an option like this? Obviously only one type of ReplayGain can be applied, and which one would determined by the user at invocation (though presumably a script or front-end would be used).

 

Apply RelayGain when encoding (Nero AAC)

Reply #1
I understand why you want this, changing the global gain value in the aac data is more "portable" than having some tag with replaygain data, it will work on any decoder. However it would mean huge changes in the encoder for a relatively infrequently used feature (I guess). Simply changing the global gain could render scalefactors out of bounds, psychoacoustic data will not match the encoded data anymore, this will all be decremental to the quality of the file we output. These are the same issues with AacGain that will not disappear when doing what you suggest.

The gain value would have to be known before starting encoding (you need it in every frame) so you will have to do some preprocessing step anyway. What I suggest is to apply the replaygain value to the uncompressed audio data (I think something like WaveGain can do this) and remember/record the scalefactor that was used somehow. You're already using lossy compression so rescaling after decoding if you want the original loudness back or changing the global gain value again, doesn't make much difference.

Apply RelayGain when encoding (Nero AAC)

Reply #2
Or if you are really concerned, you could save the scaled PCM as 24-bit, which will reduce quantization error. Nero AAC can take up 32-bit files as input, I think.

Apply RelayGain when encoding (Nero AAC)

Reply #3
Simply changing the global gain could render scalefactors out of bounds, psychoacoustic data will not match the encoded data anymore, this will all be decremental to the quality of the file we output. These are the same issues with AacGain that will not disappear when doing what you suggest.

I wasn't aware of this before. I thought AacGain's issues were more trivial (problems with changing the parameters in the file) rather than the effect on the psychoacoustics. In retrospect though, it seems pretty obvious.

Or if you are really concerned, you could save the scaled PCM as 24-bit, which will reduce quantization error. Nero AAC can take up 32-bit files as input, I think.

Thanks for the suggestion. I think I'll try an ABX between 16-bit and 24-bit processing and consider if I really want to do this before reencoding my whole library (eek!).

Thanks for the information guys. It's great to be able to hear from the Nero devs too!