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: Negative gains may result in slightly lower bitrates (Read 2321 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Negative gains may result in slightly lower bitrates

I started experimenting a bit after Greynol said that he applies album gain prior to MP3 encoding. I did the same while transcoding my entire library to Vorbis (AoTuV) -q 5: the resulting files take 711 MiB less than their counterpart (gain unchanged), over a total of 27.2 GiB. That's a 2.56% gain; average bitrate went down from 161 kbps to 157 kbps.

Obviously, I got those results because most of my music gets negative Replaygain values. As far as I'm concerned, it's interesting because I'm pretty short on space on my Clip's 32 GB microsdhc card.

Negative gains may result in slightly lower bitrates

Reply #1
Yes I also notice a slight decrease in average bitrate as a result of attenuating prior to encoding.

This is nothing new however:
http://www.hydrogenaudio.org/forums/index....c=10637&hl=

The OP in that link is the author of Omni Encoder which, IIRC can scale prior to encoding.
http://www.hydrogenaudio.org/forums/index....c=51093&hl=

Negative gains may result in slightly lower bitrates

Reply #2
Thanks for that. Caudec in SVN can now do it too:
Code: [Select]
caudec -c ogg -q 5 -G album *.flac

Negative gains may result in slightly lower bitrates

Reply #3
No problem.  Another benefit of scaling downwards prior to encoding is that clipping during lossy decoding can be mitigated, for those who are worried about it.

Negative gains may result in slightly lower bitrates

Reply #4
I suppose that this makes sense, in that some of the quieter sections of the track will be attenuated down to (near) silence, so the lossy encoder only needs to approximate a narrower section of the audio spectrum.

EDIT: The topics that greynol links to seems to explain this quite well.  Looks like I have some reading to do

Negative gains may result in slightly lower bitrates

Reply #5
Aside from Absolute Threshold of Hearing (ATH) models (or adaptive ATH models) being able to shed some info, it wasn't all that obvious why most codecs gained much by reducing volume given that nothing gets lost as such - it's pretty much all ratios used in psychoacoustic decisions, and the scaling is done in 32-bit floating point in virtually any codec, and really only ATH is based on absolute rather than relative loudness.

In LAME MP3 (in that first thread APS was --alt-preset standard, the old version of what's now -V2) there was a lot to gain by overcoming the sfb21 limitation of mp3 which means that bits don't need to be wasted below 16kHz - and this was demonstrated by using the -Y switch in LAME which saw scaling save only 0.5 kbps versus about 20 kbps without -Y in one example.
Dynamic – the artist formerly known as DickD