Run MP3Gain from MP3Tag!

I am sure that it is possible to interpret the code that calls mp3gain without any knowledge of German.

But not easier than the command line prompt that I posted.

In the linked case, mp3gain.exe writes the value into your tags.
Mp3tag is just calling this 3rd party tool with this options:

it seems (according a quick self test) that this tool write this 6 values into additional APEv2 tags in your files

MP3GAIN_MINMAX
MP3GAIN_ALBUM_MINMAX
REPLAYGAIN_ALBUM_GAIN
REPLAYGAIN_ALBUM_PEAK
REPLAYGAIN_TRACK_GAIN
REPLAYGAIN_TRACK_PEAK

Please read the lines in the mp3gain FAQ carefully:

MP3Gain stores "Analysis" and "Undo" information in special tags inside the mp3 file itself. These tags are in the APEv2 format. APEv2 tags are carefully designed to not interfere with other tag formats, such as the popular ID3v1 format.

Unfortunately, some mp3 players do not strictly adhere to the ID3v1 standard when reading tags. As a result, when MP3Gain writes its APEv2 tags, these mp3 players might get confused and try to read the MP3Gain tags instead of the regular ID3v1 tags such as "Artist", "Title", etc. As a result, the player will show random garbage in these fields.

1 Like

Hey - thanks for the heads-up. I really appreciate it! :+1:

I didn't entirely understand what you quoted - just that it's bad for mp3 players... :yum:

But, my music never leaves my hard drive. I just use it in DJ software. Do you think that those additional APEv2 tags would cause issues in Serato, Traktor, etc...?

I have no idea. But if you get in trouble, you know now where you can start searching :wink::innocent:

Perhaps not in those players but definitely when tagging with MP3tag and the tags are out of sync.
As MP3tag prefers APE tags over ID3 tags you see only the contents of the APE tags (if you let them be read). You might get the impression that all of your tag data is gone.

Thanks fellas.

I’ll take care not to test on my whole collection!

The optimum way would be to first use the gain function, then transfer the APE fields to the ID3 fields and then tag the ID3 fields (and delete the APE tags).

Hmmm... Not so sure I’d need to do that. I’ve used MP3Gain for many years and never changed anything it does.

But launching it from MP3Tag is a definite improvement on my current process/workflow.

Could this User Tool be combined with, or launched from/as an action (or action group)?

No. Tools cannot be launched as part of actions.

1 Like

Okay - NOW I think I understand what @LyricsLover and @ohrenkino were trying to tell me about the APE tags!

So now, if I copy them from APE to ID3, and then delete the APE tags, will the software (in my case Traktor & Serato) still read and apply the replay gain information?

@LyricsLover - Are you sure it writes all 6 values to the APE tags?

In MP3 Gain, you choose between TRACK Gain and ALBUM Gain.

So it looks like it (MP3Gain) writes 4 values when using Track Gain:

MP3GAIN_MINMAX
MP3GAIN_UNDO
REPLAYGAIN_TRACK_GAIN
REPLAYGAIN_TRACK_PEAK

I only use Track Gain (to set the track volume as near to 89db as possible without clipping), so I think I’ll look into copying those APE tags to the ID3 tags for visibility.

Does anyone think there could be issues with having gain info duplicated against APE & ID3? I'd like to have some replay gain info visible in the ID3 tags (even if it's just a check mark or tick to indicate that replay gain has been added)...

No, MP3tag does not write any gain values. The gain program does.
And as said before: letting ID3vx and APE tags get out of sync is a bad idea. And this will happen if you have a program that only writes the APE tags with a subset of tags and taking the already existing ID3 tags into consideration.

1 Like

Apologies - I meant MP3Gain writes the APE tags.

Understood. Maybe I'll use a vacant ID3 tag to hold the check mark/tick to indicate APE Replaygain Info.

If your allowing Mp3gain to apply the computed gains back to your mp3 files, then you need to leave them in the APE tags unless you want to go through the tedium of the reverse process to undo the gain changes.

If you are only writing tags and leaving the audio data alone, it would be much simpler to use something like foobar2000 (IMHO) to have it do the ReplayGain scans and write id3v2 tags to the mp3 files.

Understood. I’d like to leave the APE information intact, but to write some information in the ID3 tags so that I’ll be able to tell (from ID3 info) that they’ve been through MP3Gain.

I think the criterion is already there: once the file has got the gain information it has an APE tag.
So you can easily filter for these files with
%_tag% HAS APE
or for those that still have to be treated with
NOT %_tag% HAS Ape

That’s an interesting way of doing it. Thanks for the heads up.

7 posts were split to a new topic: LAME and unwanted ReplayGain fields