Editing Unmapped Tag Frames

I have thousands of mp3 tracks that are tagged with ID3v2 (artist, title, album, etc.) as well as APEv2 (mp3gain undo info). I tagged them using Mp3tag about 5 years ago. Since then, I have somehow unintentionally acquired some ReplayGain data in many of my ID3v2 tags, stored in the TXXX and RGAD frames. Perhaps this data was automatically generated into the tags by some program I was using. Anyway, I didn't create it purposely, and I don't even know if it is valid. I would like to get rid of it, preferably with a batch Action. Unfortunately, Mp3tag does not have a mapping to the RGAD frame. So how do I go about deleting contents in that frame, or chucking the frame altogether. Also, as far as the TXXX frame is concerned, how do I write an action to clear ReplayGain info out of a TXXX frame?

Curiously, the same files that somehow acquired the above-mentioned ReplayGain data also somehow acquired ID3v1 tags. So now they have ID3v2 at the start and ID3v1 at the tail. I guess this doesn't hurt anything, other than the fact that Mp3tag now shows the Year twice in the Tag Panel. Is there an easy way to simply delete all the ID3v1 tags? They don't contain anything that is not already in the ID3v2 that I created in the beginning.

If you have programs that are writing tags in your music files without your knowledge then you've got some serious problems. Can't help you there other than to advise you to figure out which programs are doing it and never use that software again. If that can't be done, set all of your music files to read-only. It's hard to imagine, though, that ReplayGain would be calculated and tags added without your having explicitly told some program to do do.

Any field in an ID3v2 tag that isn't mapped by Mp3tag will automatically reference a TXXX frame with that description. So removing REPLAYGAIN_TRACK_GAIN, for instance, would automatically remove the TXXX/REPLAYGAIN_TRACK_GAIN frame.

But Mp3tag can't directly read or write any four-character unmapped field, if that's what RGAD is. You may be able to remove it by removing all tags from the file and then undoing the operation.

Thanks, JJ.

Yes, I am very distressed about all this tag data showing up without being invited. Perhaps I made some sort of error when updating tags with something like MediaMonkey.

And yes, I did set my tracks to read-only a long time ago; but obviously not soon enough. Apparently the extra tag data got added early on. As soon as I figure out how to get these cleaned up, I will make them read-only again. And I'll re-backup the files and the tags.

It would be nice to have a way to view tags in terms of their actual 4-char tag names, and then be able to batch edit. Perry's ID3 Viewer shows you the data in all frames, but appears to be a viewer only; no editing. mp3Diags also shows detailed frame contents, but I'm not sure whether it can batch edit, and I'm having stability problems with it in Win XP. I may try it in Linux, where it is reportedly more comfortable.

If anyone knows of a way to do batch editing directly in terms of the frame names, I would be very interested in hearing about it.

You can't do it in Mp3tag. Mp3tag isn't always a good tool for troubleshooting tagging problems, and it can't work in some tagging systems with unmapped fields.

Try the remove/undo operation (Ctrl-R/Ctrl-Z) to see if it removes the RGAD frame. In your settings for Mpeg tags, change the settings to remove ID3v2 tags first. After you're done, switch it back.

(Test this first on a few files and make sure you have backups of those files so you don't chance losing all the tags!!)

Thanks again JJ for all the advice. I keep learning new things from you.

In case anyone finds this thread in searching for a solution to a similar issue, I will tell you the solution that worked for me.

To batch delete the ReplayGain data in TXXX:

Select the desired tracks
Right click and choose Extended Tags
Click on the Replay Gain field
Click on the Delete button (the Red X)
Click OK

Voila! All the TXXX frames are emptied (for the selected tracks)

To batch delete the ReplayGain data in RGAD:

Select the desired tracks
Hit [Ctrl]X to cut all the tags to the clipboard
Click OK to accept the cutting
Hit [Ctrl]V to paste the tags back into the files (from the clipboard)
Click OK to accept the pasting

Taadaa! The RGAD frames have been cleared.

It turns out that RGAD is obsolete, so when Mp3tag writes the tags back to the files, it simply drops them. This was the only solution I could find for batch removing these nasties, but it works just fine.

You might want to create an action group to remove ReplayGain tagging and run it from the Actions (Quick) button. Should save you some trouble vs. using the Extended Tags dialog. These are the only five ReplayGain fields that you should encounter.

Action type: Remove fields

You'll still need to do the Ctrl-X/Ctrl-Z to remove the unmapped RGAD field.

Thanks, JJJ!

That sounds like a great idea. I'll try it out on a couple of tracks. If it works well, I'll use the Actions approach.

I'll definitely note down all your suggestions in this thread, for future reference.

Of course, I'll avoid tagging with other software, and keep my tracks "Read Only" as much as possible. Saving clean backups will be another "must."