Help - Search - Members - Calendar
Full Version: FLAC, EAC, MAREO and Replay Gain
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
Mr Bungle
Need some help... I can't figure out how to get replay gain (album gain) working using EAC and MAREO. I think the following would work in mareo.ini if metaflac.exe accepted wildcards, but it doesn't:

EXECUTEIF = [1] = [TRACK]
FINALPATH = D:\Music\flac\[ARTIST]\[ALBUM]\
FINALNAME = [TRACKPADDED] - [TITLE]
VFINALPATH = D:\Music\flac\Various\[ALBUM]\
VFINALNAME = [TRACKPADDED] - [TITLE]
EXTENSION = flac
ENCODEREXE = metaflac.exe
PARAMETERS = --add-replay-gain "D:\Music\flac\[ARTIST]\[ALBUM]\*.flac"
RENAME = FALSE

FYI the above approach works for VorbisGain because it takes wildcards.

I searched around and can't find anything. Any ideas?

Maybe I could use a batch file to pass all the flac file names to metaflac? I have been trying to dissect flac-113.bat for ideas.
Mr Bungle
Anyone able to help?

I would have thought this was a common problem but I can't find any info on it and no-one is saying anything sad.gif
kwanbis
maybe you can create a BAT file, that runs metaflac, for each flac. Something like:

flacalbumgain.bat
cd %1
for %%a in (*.flac) do metaflac.exe --add-replay-gain %%a

then, you would need to configure MAREO like:

EXECUTEIF = [1] = [TRACK]
FINALPATH = D:\Music\flac\[ARTIST]\[ALBUM]\
FINALNAME = [TRACKPADDED] - [TITLE]
VFINALPATH = D:\Music\flac\Various\[ALBUM]\
VFINALNAME = [TRACKPADDED] - [TITLE]
EXTENSION = flac
ENCODEREXE = flacalbumgain.bat
PARAMETERS = [FINALPATH]
RENAME = FALSE
Mr Bungle
Thanks, but it doesn't work. If I do this from the command line:

for %a in (*.flac) do metaflac.exe --add-replay-gain "%a"

It will execute metaflac on all of the flac files but will do so one at a time instead of all at once as required for album gain.

What does cd %1 do?
kwanbis
right ... but what does metaflac has to do with gain? afaik, it only deals with metadata ...

cd = change directory (it goes to directory passed to flacalbumgain.bat as the first parameter).

collector
QUOTE(kwanbis @ Mar 28 2007, 06:43) *

right ... but what does metaflac has to do with gain? afaik, it only deals with metadata ...


And tags are metadata ? And replaygain adds a tag ? And metaflac.exe can add a replay-gain-tag to a flacfile ?
Problem solved. From within a batchfile I give the command "glob.exe -c metaflac.exe add-replay-gain *.flac"


QUOTE(Mr Bungle @ Mar 28 2007, 05:11) *

Thanks, but it doesn't work. If I do this from the command line:
for %a in (*.flac) do metaflac.exe --add-replay-gain "%a"
It will execute metaflac on all of the flac files but will do so one at a time


'for x in do" commands don'work from the command line

From within a batchfile I give the command "glob.exe -c metaflac.exe add-replay-gain *.flac"
So ask someone to upload glob.exe or find it yourself on the net, and get your taggingjobs done smile.gif
Works for me.
kwanbis
QUOTE(collector @ Mar 28 2007, 18:07) *

'for x in do" commands don'work from the command line.
yes it does.

C:\Documents and Settings\Administrator>for %a in (*.*) do echo %a

C:\Documents and Settings\Administrator>echo .fotki-uploader300-settings.xml
.fotki-uploader300-settings.xml

C:\Documents and Settings\Administrator>echo .ganttproject
.ganttproject

C:\Documents and Settings\Administrator>echo .lastFolder
.lastFolder

C:\Documents and Settings\Administrator>echo 1171481126-oem27.inf
1171481126-oem27.inf
collector
QUOTE(kwanbis @ Mar 28 2007, 11:32) *

QUOTE(collector @ Mar 28 2007, 18:07) *

'for x in do" commands don'work from the command line.
yes it does.


OK What you want. wink.gif (Does not work here, but I use batchfiles anyway)
It will not do the album mode for replay-gain when you use the commandline, and that's the problem of the original poster. With the batchcommand it will work.
kwanbis
thing is that to calculate album gain, an app should accept either *.flac, or a directory, if not, how does it calculates over all files?
Lashiec
Try using 'glob', an utility bundled with REACT, which takes a whole dir full of files and passes them to a commandline program. I think it was specially made for metaflac, which doesn't seem to accept filled folders throught the commandline, only single files. I tried the program a few times with MAREO in the past, and althought it didn't work, at least it seemed it could (I think the problem lied in my stubbornness in using Win98). You can download it directly from here. In that page you can also see the parameters it uses. tycho modified the program for its inclusion, so maybe works better than the original, you can obtain REACT here. Look in the zip for "glob.exe". Hope this helps.

I beg kwanbis pardon for promoting other program wink.gif
collector
QUOTE(kwanbis @ Mar 29 2007, 08:29) *

thing is that to calculate album gain, an app should accept either *.flac, or a directory, if not, how does it calculates over all files?


IF it works, I do not need to know HOW it works. I use the 'glob' for processing metaflac commands and for converting flac to flac. It works and since I use Mareo I'll try that combination too.
Mr Bungle
OK I have got it working by stringing together partially correct information from different people smile.gif

How to get it working
mareo.ini:

EXECUTEIF = [1] = [TRACK]
FINALPATH = D:\Music\flac\[ARTIST]\[ALBUM]\
FINALNAME = [TRACKPADDED] - [TITLE]
VFINALPATH = D:\Music\flac\Various\[ALBUM]\
VFINALNAME = [TRACKPADDED] - [TITLE]
EXTENSION = flac
ENCODEREXE = flacalbumgain.bat
PARAMETERS = "[FINALPATH]"
RENAME = FALSE

flacalbumgain.bat:
d:
cd %1
"c:\Program Files\EAC\mareo\Glob.exe" -c metaflac.exe --add-replay-gain *.flac

Notes
* I needed to use d: in the batch file because the 'cd' command won't change drives (not for me anyway)
* I am using the modified glob.exe that comes with REACT. The official codeproject glob.exe doesn't take the -c argument for a start and didn't seem capable of performing the task

Thanks to those that people helped
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.