Help - Search - Members - Calendar
Full Version: Replaygain Values
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
kritip
Hi,

I have ~= 80 albums ripped into FLAC files. These have all been relaygain in album mode via Foobar(for my personal listening).

Today i wrote a batch file that converted all my FLAC's into Vorbis files, preseving tag's, then applied replay gain to the files and concatinated them into single file albums and named them accordingly.

I transcoded using -q2 and have noticed clipping in playback on a lot of the files. I noticed the replaygain values were quite high and so decided to post here rather than the dedicated OGG Vorbis forum as i may have done something wrong when applying replaygain?

For example, one off my FLAC'ed files has the values:


REPLAYGAIN_TRACK_GAIN = -10.4700 dB
REPLAYGAIN_TRACK_PEAK = 0.9689
REPLAYGAIN_ALBUM_GAIN = -9.0400 dB
REPLAYGAIN_ALBUM_PEAK = 0.9693


Whereas the Vorbis version has the values:


REPLAYGAIN_TRACK_GAIN = -10.77 dB
REPLAYGAIN_TRACK_PEAK = 1.75603390
REPLAYGAIN_ALBUM_GAIN = -9.20 dB
REPLAYGAIN_ALBUM_PEAK = 2.27333665


Now i know lossy compression can increase the level of clipping in a file, but looking at the album peaks, this is a "2 and one third" times increase. Is this to be expected or do you think something is wrong?
Just want a few opinions as i don't really want to experiment transcoding all those files again!!!.

If anyone wants to see it, my batch file is at the bottom, crude and too the point but it does what i wanted.

Cheers for your input and opinion,

Kristian

CODE
title FLAC to Vorbis Conversion Process
mkdir c:\MUSIC\vorbis_temp
dubl c:\music\flac c:\music\vorbis_temp oggencFLAC #1 -q2 -o #2\#3.ogg
cd c:\music\vorbis_temp
vorbisgain -q -a -r -s *.ogg
sweep copy /b *.ogg 1
del /s *.ogg
sweep ren 1 1.ogg
Tag --rentag --recursive --scheme "A - L" *.ogg
sweep move *.ogg f:\vorbis
cd c:\
rmdir /S c:\MUSIC\vorbis_temp
Pause
DickD
Sounds like you have an album of highly dynamically compressed music - i.e. a recent commercial release which is extremely LOUD (w00t) . As you'll probably have read, such extreme loudness removes headroom and has to be at the expense of quality (see www.digido.com). Perhaps that is partly why CD sales are down?

-10 to -11 dB album and track gain is reasonably well known for recent releases (e.g. Red Hot Chillipeppers was one very loud example I read about). The peak values aren't 1.0000 in FLAC (that's also common recently), but that may be a sign of the type of extreme compression/limiter used.

If you want a sanity check the Replaygain, try the album or track in Foobar2000 and right-click to scan for Replaygain. The peak values should be the same (in Show Info or Replaygain/Edit Replaygain Info) but the track and album gain values may be slightly different due to a subtly different implementation of RG. If they're within 1 dB of each other, it's an inaudible difference to most people. It's the peak values you're wondering about, and this ought to be reliable.

The Ogg Vorbis peaks are extreme, but I could imagine they're plausible with such extreme limiting introducing overtones to flatten the peaks. If some of the many high frequency overtones are removed, changed in phase or distorted in amplitude by the lossy encoding (especially likely for non-transparent settings like oggenc -q 2) then you could get some serious overshoot (try normalising to 50% then low-pass filtering the file at 4 to 8 kHz in a WAV editor to see the change!). It might be fairly infrequent during the track, but with so many flattened peaks throughout the song, the chance of one out of hundreds of peaks getting to 1.75 might be pretty high. Give Lame --APS or mppenc --quality 5 --xlevel a try on the same song and see if it's as loud and the peaks are so high (foobar will tell you).

In short, this is worse than I've seen, but I haven't encoded many or any CDs above 95-96 dB loudness. (-6 to -7 dB replaygain)
kritip
Yes, it wasn't the Gain adjustments that particularly worried me, i have albums worse than this, it was more the peaks that seemed very odd after it had been compressed.
As the sanity check i re-calculated the album with foobar and the results are pretty much the same (other than the tag order, rounding and capitalization biggrin.gif ) so it must just be the type of music that i'm compressing Aphex Twin, Richard D. James Album 1996, electronic.
I will have to give decoding to WAV and comparing the clipping levels ago at some point. As well as trying higher quality >2 and other codecs as well. At a later date though, got two weeks till i finish Uni ohmy.gif

Cheers for your sugestion and input, it as most helpfull,

Kristian

Vorbis Gained

REPLAYGAIN_TRACK_PEAK = 1.75603390
REPLAYGAIN_TRACK_GAIN = -10.77 dB
REPLAYGAIN_ALBUM_PEAK = 2.27333665
REPLAYGAIN_ALBUM_GAIN = -9.20 dB

Foobar Gained
replaygain_track_gain = -10.7700 dB
replaygain_track_peak = 1.7560
replaygain_album_gain = -9.2000 dB
replaygain_album_peak = 2.2733
DickD
Hmm, yes tracks like Fingerbib have some loud electronically generated sounds some with some high frequency fizzing noises. I guess if you start filtering heavily, as oggenc -q 2 effectively would, that might explain such high peaks. I've encoded that track with Musepack -q 5 and noticed nothing unusual.
kritip
Yes, To Cure A Weakling Child:

Vorbis -q2
REPLAYGAIN_TRACK_PEAK = 2.27333665
REPLAYGAIN_TRACK_GAIN = -9.88 dB
bitrate = 107

Vorbis -q5
replaygain_track_gain = -9.9200 dB
replaygain_track_peak = 1.3694
bitrate = 184

MPC -q5
replaygain_track_gain = -9.8600 dB
replaygain_track_peak = 1.3024
bitrate = 206

MPC --thumb
bitrate = 105
replaygain_track_gain = -9.8400 dB
replaygain_track_peak = 1.7358


So yes, it just occurs with the higher compression settings, now i'm aware i won't worry about it when i do some more low quality encodes, just hadn't seen the scenario occur before.

Cheers,
Kristian
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.