Hydrogenaudio Forums

Lossless Audio Compression => FLAC => Topic started by: Gehirnmaehung on 06 December, 2017, 09:15:01 AM

Title: need tool for replaygain on flac files
Post by: Gehirnmaehung on 06 December, 2017, 09:15:01 AM
Hi,

i am looking for a tool that analyzes a flac file (whole album) and returns values for REPLAYGAIN_ALBUM_GAIN, REPLAYGAIN_ALBUM_PEAK and REPLAYGAIN_ALBUM_SCALE (scale is optional). I have only the flac, i dont have the wav anymore.

I tried a few different things and either it doesnt support flac or applys it directly to the flac. I just need those values as return to further proccess them.

Any ideas? :)

Thanks in advance!
Title: Re: need tool for replaygain on flac files
Post by: adamOLC on 06 December, 2017, 10:05:18 AM
Foobar can read replay gain if I recall correctly.  You can even apply replay gain with foobar too.  I'd provide some more info, but I'm at work and don't have it in front of me.
Title: Re: need tool for replaygain on flac files
Post by: Zarggg on 06 December, 2017, 01:59:48 PM
To clarify, foobar2000 can scan and write ReplayGain tags (metadata), but it cannot adjust the gain of FLAC files directly. Any decent player should be capable of reading them and adjusting playback volume accordingly, however.
Title: Re: need tool for replaygain on flac files
Post by: smok3 on 06 December, 2017, 03:42:16 PM
Code: [Select]
man metaflac 
looks promising. You probably want
Code: [Select]
metaflac --scan-replay-gain *.flac
Title: Re: need tool for replaygain on flac files
Post by: Chibisteven on 06 December, 2017, 03:52:51 PM
To add replaygain tags, right click on a group of files in foobar2000's playlist and choose the desired scan as tracks or as an album.  This will add new tags.  The process doesn't change the FLAC file itself.  This is useful for all applications that support reading of ReplayGain tags.

To apply Replaygain directly to a brand new FLAC file in foobar2000 involves using the converter.  Your files will need to have ReplayGain tags otherwise it won't work.  Replaygain is under "processing".  Keep in mind this process is not reversible.  This will create a new file.  Be sure to keep the original file, just in case.  Click on any set of files in the playlist and choose ",,," under convert.  This is useful for portable players that don't support ReplayGain but can play FLACs.
Title: Re: need tool for replaygain on flac files
Post by: lithopsian on 06 December, 2017, 04:02:56 PM
Deadbeef will do it, but you'll need the latest development version which probably means you'll have to compile your own.  Replaygain scanning is just an operation on any track or group of tracks, then tags are written to the file if you like the results.
Title: Re: need tool for replaygain on flac files
Post by: Gehirnmaehung on 07 December, 2017, 07:06:11 AM
Thanks for the replys! :)

To clarify, foobar2000 can scan and write ReplayGain tags (metadata), but it cannot adjust the gain of FLAC files directly. Any decent player should be capable of reading them and adjusting playback volume accordingly, however.

That is correct, i should have been more precise: i need the values, and foobar doesnt return what i need (at least not what i can see). I want to add it in cuesheets, as i already have many CDs ripped that way and dont want to change the result.

Code: [Select]
man metaflac 
looks promising. You probably want
Code: [Select]
metaflac --scan-replay-gain *.flac

That does it, thanks!