Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Replay Gain mp3 tag format (Read 4733 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Replay Gain mp3 tag format

I have a question.

In the Replay Gain proposal, I suggested that the Replay Gain data could be stored in an mp3 in 1 of 2 ways:

1. in the Lame tag
2. in an ID3v2 tag

If you use lame to encoder you mp3s, I'm informed that the replay gain values within the lame tag are set to zero, because replay gain isn't currently included in lame. No one has produced a program to add the values after encoding.

Many people hate ID3v2 tags, and they do cause some compatibility problems.

So, my question is: I have an mp3 that was not encoded using lame. I wish to add Replay Gain information (not alter the audio data itself - I'm aware of mp3gain ;-)). Where should I put this information?

1. Lame tag? Seems silly - it's not a lame encoded file, and most of the tag will be empty.
2. ID3v2 field? Some users won't want to add an ID3v2 tag to their files.
3. Extra field at the end of the mp3? If this can be done, this seems a good idea...

I'm aware of ID3v1.1 (and its limits) - I'm also aware of lyrics3 which sits at the end of an mp3 (like ID3v1 but with more information). Something like this seems an ideal solution storing the Replay Gain values - because you can just add it at the end of the file (without having to re-rewite the entire file) and it doesn't cause any compatibility issues.

Anyone have any comments on this? Does anyone have experience with lyrics3 - is it really compatible with all players? Would adding a tag for Replay Gain be a good idea?

Feedback please: when adding RG data to a non-lame mp3, should I use a lame tag, an ID3v2 extension, or a lyrics3 extension?

Cheers,
David.
http://www.replaygain.org/

Replay Gain mp3 tag format

Reply #1
Hmm. No feedback from anyone else yet, huh?

I think the "LAME" tag (even for non-LAME files) would be the most compatible with players, since it's embedded in the Xing header frame. But it would be a headache to add that whole header frame to files which don't have it already.

Personally, I like the Lyrics3 (or similar) idea. But I don't have experience with the whole tag issue, so I too would like some feedback from more experienced folks before I code anything

-Glen

Replay Gain mp3 tag format

Reply #2
HELLOOOOO? anyone?

Replay Gain mp3 tag format

Reply #3
Ok. I know jack shit about Id3 tags but if you want any kind of feedback I'll give you mine.

You have basically given the answer yourself as far as I can see.

Go for compability! We want RG to be as widespread as possible, right?
Since Id3v2 tags seems to generally considered incompatible leave them out. If a Lame tag won't/be added by the replaygain tool, then this too should be disqualified. Having RG only applicable to Lame-encoded files just seems "wrong" yesno?

So I guess the question boils down to how you best store the values in a Id3v1 tag or Lyrics3.  And there I cannot help you.

Just my two Xiphs

Replay Gain mp3 tag format

Reply #4
Even though ID3v2 is not popular amongst developers, it is still far more popular than Lyrics 3 with the general public.

If you are dead set against using ID3v2, an alternative is to use a byte or 2 from the comments field in the ID3v1.1 tag, as was done for the Track# field when the standard was upgraded to  ID3v1.1.

Replay Gain mp3 tag format

Reply #5
Quote
Originally posted by YinYang

So I guess the question boils down to how you best store the values in a Id3v1 tag or Lyrics3.  And there I cannot help you.

Now my question is, how is it done in MPC?
I don't have a damn clue where the replaygain data is stored in MPC, but if it is in the id3v1.1 tags, then, couldn't it be the same for mp3?

Replay Gain mp3 tag format

Reply #6
Quote
Originally posted by Somebody 

I don't have a damn clue where the replaygain data is stored in MPC, but if it is in the id3v1.1 tags, then, couldn't it be the same for mp3?


The replaygain data is built into the actual header tag of the mpc format, which is diifferent to mp3.
So mp3 has to use a different method to mpc.

Replay Gain mp3 tag format

Reply #7
huanjo,

That's a great picture you've got there! Where's it from?


I thought about putting the RG data into the ID3.1 comment tag like you suggested, but it would look like garbage in the players which didn't know what to do with it. This means most users would delete it, meaning that RG info wouldn't travel with files.

If I put in in lyrics3, then any player that doesn't understand it will just ignore it, and users won't see it. The other advantage is that if people don't want to tag their files (it seems many don't) you can add a lyrics3 tag WITHOUT having to add title artist album genre year - you add the minimum of extra information. However, I'm not sure if lyrics3 will work without ID3v1.1 there too.

I'm stating what I hope to do because I'm hoping someone will come along and explain any pitfalls before it's coded. This isn't set in stone, and I'd love some constructive criticism.

(I wrote this in case people were put off by my, erm, enthusiastic defense of Replay Gain being implemented exactly as I'd suggested!)

Any ideas anyone? Do people think ID3v1.1 comment extension (well, comment subtraction really!) is the best way forward? I know lyrics3 is less compatible with players now, but since players have to be modified in order to read the RG tag wherever it goes, I don't see this as a major problem - they just have to know where to look. Have I missed something?

Cheers,
David.

Replay Gain mp3 tag format

Reply #8
I must stress again that ID3v2 is far more popular than Lyrics3. The major players (e.g. Winamp, Windows Media Player) don't support Lyrics3, only ID3v2.
Once the programming has been done to support a certain tagging format in a player, it is easy to read/write any type of fields belonging to that format. What is a problem, is the work involved in adding support for another tagging format, such as Lyrics3.

>However, I'm not sure if lyrics3 will work without ID3v1.1 there too.

Lyrics tags do require ID3v1 tags to operate, so no short cuts there.

Oh, and my avatar I got from http://www.animfactory.net/
I thought it fitted in with the theme of the forum