Help - Search - Members - Calendar
Full Version: MetaFlac > ReplayGain
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
costello
Two points as I contrast metaflac's --add-replay-gain function with that of foobar2000

1.) Why does metaflac add album gain tags if you aren't encoding album gain? Foobar's approach seems more logical even if the metaflac tag seems more consistent with the replaygain spec

Generated by metaflac:
REPLAYGAIN_TRACK_PEAK = 0.99996948
REPLAYGAIN_TRACK_GAIN = -4.93 dB
REPLAYGAIN_ALBUM_PEAK = 0.99996948
REPLAYGAIN_ALBUM_GAIN = -4.93 dB

Generated by foobar:
replaygain_track_gain = -4.9300 dB
replaygain_track_peak = 1.0000

2.) Can we add some sort of console status so that we see the percentage of progress and then an indication of what file was completed? Try masstagging several thousand flac files using Speeks' metaflac front end and you will see what I mean, nothing but lines.
mmortal03
I can't even get --add-replay-gain to work with metaflac on more than one file, neither can I get speek's quick and dirty metaflac frontend option "All input files on one command line" to work, and I know I am not going over the 2000 character limit he states in the documentation. All I get is:

Too many parameters
Too many parameters
Bad command or file name

Quoting the FLAC developer, jcoalson, from this thread http://www.hydrogenaudio.org/forums/index....,album,and,gain

QUOTE
QUOTE (shpike @ Feb 17 2003 - 06:49 PM)
I've hunted through the replaygain stuff but can't find anything about whether I need a replaygain application in the EAC directory, or where to get it if there is one.  Do you only have to put the option in the command line and Flac will do it all?  I did find a vorbis replaygain.exe - will this work?

If you can't do the album gain from EAC you can add it later with metaflac, e.g. "metaflac --add-replay-gain *.flac"

Josh


this does not work. I get:

CODE
D:\Music\CDRips~2\311\1995-3~1\*.fla: ERROR: reading metadata, status = "FLAC__M
ETADATA_CHAIN_STATUS_ERROR_OPENING_FILE"


oh, and btw, why is the foobar information rounded?
Amadablam
Check out this recent thread for information about why FLAC in Windows doesn't handle wildcards (*.flac) correctly and what you might do about it:

http://www.hydrogenaudio.org/forums/index....ST&f=19&t=7249&
jcoalson
QUOTE(costello @ Feb 7 2003 - 10:49 PM)
1.) Why does metaflac  add album gain tags if you aren't encoding album gain? Foobar's approach seems more logical even if the metaflac tag seems more consistent with the replaygain spec

Rather than have two switches to tell metaflac to do album and/or track gains, it just calculates both (i.e. if you do --add-replay-gain on one file it treats the single file as a whole album). This way players don't need extra logic to handle cases when the album gain is missing. There are plusses and minuses for both ways of doing it.

If it's annoying you though you can delete the album tags with metaflac later. That will be very quick.

Josh
mmortal03
QUOTE(Amadablam @ Mar 23 2003 - 06:53 PM)
Check out this recent thread for information about why FLAC in Windows doesn't handle wildcards (*.flac) correctly and what you might do about it:

http://www.hydrogenaudio.org/forums/index....ST&f=19&t=7249&

I read that thread a couple weeks ago and somehow forgot about it (it didn't apply to me at the time). Thank you for reminding me, I'll try that out.


Edit: I guess I am still unable to album gain my FLAC files, as I am running Windows ME (which the batch will not work on) sad.gif Any ideas besides an OS change?
Speek
QUOTE(mmortal03 @ Mar 24 2003 - 06:07 AM)
I guess I am still unable to album gain my FLAC files, as I am running Windows ME (which the batch will not work on) sad.gif  Any ideas besides an OS change?

mmortal03,

Have you tried putting metaflac.exe somewhere in the Windows path (i.e. C:\Windows)? There's a line in go.bat that adds the application directory to the path, but it could be that this line doesn't work in WinMe.
/\/ephaestous
@Speek

Would you please add an option for using DOS (8.3) filenames in your flac /metaflac frontend. that way we would be able to add a lot more files without hitting the 2000 character limit.

@mmortal03
Well, anyway my bat wouldn't help in your case since it processes files one per one and you'd end up wih every flac replaygained with title gain (wich is fine for me because I store everything as one-file albums).

[ZEALOT]
If by no means you can get metaflac or the frontend to work then just use foobar for replaygaining and your ol' player for playing back the flacs.
[/ZEALOT]
_io_
I recently had this same problem and put together a .bat file that will do album gain for a directory, any interest?
If so i will put it up on some webspace

io
mmortal03
QUOTE(_io_ @ Mar 24 2003 - 01:30 PM)
I recently had this same problem and put together a .bat file that will do album gain for a directory, any interest?
If so i will put it up on some webspace

io

Sure, I mean, if it solves the problem, thats exactly the solution I need.
/\/ephaestous
@Io

if it's a bat why don't you just post it as code in the thread.
_io_
ok i have 2 versions here, the first will run without any help and from another file but it does throw up a couple of errors, although it does work:

Batch 1
QUOTE
:: Process a file (%1) passing to a variable each line
:: Exits if a blank line is encountered
:: Leonardo Pignataro (secret_doom@hotmail.com)
:: Edited for use by _io_
@echo off
DIR /b *.flac > %TEMP%.\T1.BAT
echo e100'SET %%1='> %TEMP%\T3.DAT
for %%? in (rcx 7 w q) do echo %%?>> %TEMP%.\T3.DAT
type nul> %TEMP%.\T2.DAT
DEBUG %TEMP%.\T2.DAT < %TEMP%.\T3.DAT > nul

:loop
copy/y %TEMP%.\T2.DAT+%TEMP%.\T1.BAT %TEMP%.\T3.DAT > nul
FIND "SET %%1=" < %TEMP%.\T3.DAT > %TEMP%.\T1.BAT
call %TEMP%.\T1.BAT LINE
if "%LINE%"=="" goto loopend

:: At this point, the variable %L% will have
:: as value each line from the processed file.

SET filelist="%LINE%" %filelist%

FIND/V "SET %%1=" < %TEMP%.\T3.DAT > %TEMP%.\T1.BAT
goto loop

:loopend
for %%? in (T1.BAT T2.DAT T3.DAT) do del %TEMP%.\%%?

:: ====================
:: Path to metaflac.exe
set path=C:\Documents and Settings\io\Desktop\New Folder\codecs
:: ====================
metaflac --add-replay-gain %filelist%
pause


This second batch file uses another file to help it which you can get here. This batch doesn't produce any errors

Batch 2
QUOTE
@ECHO off
DIR /b *.flac > filelist.bat
:: ===================================================
:: Leonardo Pignataro (secret_doom@hotmail.com)
:: Edited by _io_
:loop

:: The path to flac_helper.dat must be set here
COPY /Y "codecs\flac_helper.dat" + filelist.bat working.dat > nul
:: ============================================

FIND "SET %%1=" < working.dat > filelist.bat
CALL filelist.bat LINE
IF "%LINE%"=="" GOTO loopend
SET filelist="%LINE%" %filelist%
FIND /V "SET %%1=" < working.dat > filelist.bat
GOTO loop
:loopend
DEL filelist.bat
DEL working.dat
:: ===================================================

:: Path to metaflac.exe must be set here
codecs\metaflac.exe --add-replay-gain %filelist%


any problems and i will check here later
mmortal03
QUOTE(mmortal03 @ Mar 23 2003 - 06:25 PM)
oh, and btw, why is the foobar information rounded?

I'm still wondering.
Go2Null
To the last question (truncation of peak values), see:
http://www.hydrogenaudio.org/forums/index....howtopic=16926&
dreamliner77
Prolly a real stupid question, but I've just started using flac. How do I view the replaygain values with winamp? I thought they should display in the flac tag, but they don't.
SubPar
QUOTE(dreamliner77 @ Jan 2 2004, 02:42 PM)
Prolly a real stupid question, but I've just started using flac.  How do I view the replaygain values with winamp?  I thought they should display in the flac tag, but they don't.

I see the replaygain values here, using X-Fixer's beta7 plugin.
dreamliner77
Ok, that worked. Something with my dll must've got borked
mad_arab
I had to use that .bat file too to get it to work (xp). Is there any easy way to rewrite it to remove the track gains and let the album gain stay?
kjoonlee
QUOTE(jcoalson @ Mar 24 2003, 11:37 AM)
Rather than have two switches to tell metaflac to do album and/or track gains, it just calculates both (i.e. if you do --add-replay-gain on one file it treats the single file as a whole album).  This way players don't need extra logic to handle cases when the album gain is missing.  There are plusses and minuses for both ways of doing it.

If it's annoying you though you can delete the album tags with metaflac later.  That will be very quick.

Josh
*

The Replay Gain standard mentions that you need to have that extra logic to handle cases when one of the gains is missing: you use the other gain instead.

I'd love it if metaflac or flac would have separate modes for album scanning (add both album gain and track gain) and track scanning (add track gain only.)
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.