Help - Search - Members - Calendar
Full Version: Apply replaygain values directly to audio stream
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
emtee
Hi everyone,

A previous version of fb2k (not sure which one) used to allow applying replaygain directly to the audio stream of a file. This would indeed irreversibly change the audio file, ie, it wasn't a lossless process. The version I'm currently using 0.9.5 (which I believe is the latest) doesn't offer that option, even though I installed all the optional components. I need this feature. Is there an addon or something?
shakey_snake
The option is only available for MP3 files and requires foo_rgscan.dll to be in the components folder. If you don't have the .dll rerun the foobar2000 installer to install it.

I don't know why you would, but you may have to add the items to the context menu:
file -> preferences -> Display -> context menu

The items are named:
Apply Track ReplayGain to MP3 Data and
Apply Album ReplayGain to MP3 Data
odyssey
With lossy files it's only possible on mp3-files (although in a lossless way). Other lossy files does not have that option.

However you can reencode the files easily, using the "Convert" option and apply RG info before conversion.
chromium
QUOTE(odyssey @ Apr 2 2008, 15:57) *

However you can reencode the files easily, using the "Convert" option and apply RG info before conversion.

Not recommended if you convert from one lossy format to another.
shakey_snake
I wouldn't recommended re-encoding from any lossy source.
emtee
Hi everyone, thanks for the great suggestions.

QUOTE(shakey_snake @ Apr 1 2008, 01:00) *

The option is only available for MP3 files and requires foo_rgscan.dll to be in the components folder.

Unfortunately I need this feature for my iPod, and most of the files are in m4a.

You see, it seems that Apple's implementation of ReplayGain (Sound Check) is limited to track gain, resulting in some really horrible dynamics between tracks of the same album. This is definitely not an option, and I prefer to disable Sound Check than having to deal with this.

QUOTE(odyssey @ Apr 2 2008, 15:57) *

However you can reencode the files easily, using the "Convert" option and apply RG info before conversion.

How would this work? It looks interesting, because I do encode the m4a's from lossless sources. I could reencode them all again using that feature. However, I'm not sure if the result is exactly what I want. I would assume it is similar to track gain, right?

QUOTE(chromium @ Apr 2 2008, 18:41) *

Not recommended if you convert from one lossy format to another.

Transcoding is evil alright.
shakey_snake
QUOTE(emtee @ Apr 2 2008, 16:04) *

QUOTE(odyssey @ Apr 2 2008, 15:57) *

However you can reencode the files easily, using the "Convert" option and apply RG info before conversion.

How would this work? It looks interesting, because I do encode the m4a's from lossless sources. I could reencode them all again using that feature. However, I'm not sure if the result is exactly what I want. I would assume it is similar to track gain, right?
Not necessarily.
You could apply the "album gain" values to the audio data.
garym
I use mp3tag actions to convert the ITUNES soundcheck values (tracks) to replaygain album tags. I do this on both mp3 files and aac. I find this very useful as I can use the itunes/ipod soundcheck feature yet get the benefit (for me) of album level adjustments in playback. I much prefer this.

First, you'll need the latest build of mp3tag (ver 2.40).
Next you'll need the action that converts the replaygain album number to the soundcheck (Comment ITuneNorm). You should create a new action with
"format value" formatting the field "COMMENT ITUNENORM" (that is a space between COMMENT and ITUNNORM) with the following format string: $rg2sc(%REPLAYGAIN_ALBUM_GAIN%)

For AAC files, do the same as above but instead of formatting field "COMMENT ITUNENORM" the field is simply "ITUNENORM"

Or if you prefer, simply load both the following strings in a single action. Then you can select all files to run action on (either mp3 or aac) and the correct field will be written:

Field = "COMMENT ITUNENORM" (without quotes)
$if($eql(%_extension%,mp3),$rg2sc(%REPLAYGAIN_ALBUM_GAIN%),)
Field = "ITUNNORM" (without quotes)
$if($eql(%_extension%,m4a),$rg2sc(%REPLAYGAIN_ALBUM_GAIN%),)

Regarding running a batch, I have recently run these actions on 20,000 files at a time with no problem. [note that this works fine on my newest laptop but bombs with too many files on my old computer....I think this is memory limitation issue on the old machine. On it I could do a few thousand files at a time]. So in terms of ease of doing all this at once, you can basically make a few mouse clicks, walk away for a few hours, and come back and the files are all done and ready to import into ITUNES. And you'll notice that itunes doesn't try to determine soundcheck values when importing because it recognizes that that info is already there. If the songs were already in ITUNES, the soundcheck values will be replaced with the new ones (that are based on album replaygain values).
emtee
Very ingenious, garym.

I've already tested the previously suggested solution by odyssey and shakey_snake, and turns out it works very well for my needs. Avoiding SoundCheck at all is an added bonus, I don't have a lot of faith in it.
Thanks for everyone for your tips, problem solved.
2Bdecided
I reckon there should be a foobar2k FAQ at the top of the forum, and this should be in it!

Cheers,
David.
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-2008 Invision Power Services, Inc.