comparing id3v1 and id3v2 tags

Hi. Since I have not yet figured out the full extent of mp3tag's powers, I wanted to ask you if mp3tag has means to solve the following problem:

I want to parse my whole music collection and get rid of all my id3v1 tags. However I don't want to discard them blindly, but compare them first with the v2 tags and only delete v1 tags that are indeed identical - in order not to lose any information (=delete all except inconsistent tags). I would then compare the remaining inconsistent (not identical) tags manually.

So what I would need is to tell mp3tag to check if v1=v2, if true delete v1, and do this with all my files. (scenario A)

I would be already quite happy with the above. However the perfect (and a bit more complicated scenario) would be as follows:
compare all v1 fields to their v2 counterparts and delete all identical v1 fields, then go to next file. (scenario B )

Is there a way mp3tag's features can help?
thank you

PS: My first guess was "actions" ... but I didn't find any appropriate action type. Actually, I'd need kind of an "IF" operator.

There is described how to pull field content from the ID3v1 tag into view of ID3v2 tag:
Feature Request: Delete (and copy between) certain types of tags (ID3v1, APE)

To do the comparisons the Mp3tag Filter can help.


Thank you Detlev.

What filter command can compare v1 and v2 tags/fields?
(There is only IS but no IS )
And how can I use this filter in an action?

Ideally I would like to set up an action according to scenario B above:

if title_v1 matches title_v2, delete title_v1
if artist_v1 matches artist_v2, delete artist_v1
if album_v1 matches album_v2, delete album_v1
if track_v1 matches track_v2, delete track_v1
if year_v1 matches year_v2, delete year_v1
if comment_v1 matches comment_v2, delete comment_v1
if genre_v1 matches genre_v2, delete genre_v1
go to next file

Can you give me a hint, because even after reading your link and the help pages on "actions" and "filters" I still have no idea how to accomplish this task.

There is no chance to filter or compare tag field content from different tag versions at once.

You cannot delete a ID3v1 tag field from the view of ID3v2 tag
(caution: sure, there is a way, but this would not help here to discuss it).

You can remove the complete ID3v1 tag by setting the right options and press keys like [Ctrl+X] and [Ctrl+V] to cut off all tag versions from the tracks into Mp3tag clipboard and immediately fill in the tag version as set by the Mpeg options

If you have followed the link and the description how to pull up field content from the ID3v1 tag onto the level and into the view of the ID3v2 tag, then you can apply a filter mask like the following example.

Fo find all tracks with identical value in two fields, e. g.
ALBUM IS "Rio Grande" AND ALBUM_ID3V1 IS "Rio Grande"

Fo find all tracks with different value in two fields, e. g.
ALBUM IS "Rio Grande" AND ALBUM_ID3V1 IS "River Deep"

Fo find all tracks with this or that value in two fields, e. g.
ALBUM IS "Rio Grande" OR ALBUM_ID3V1 IS "River Deep"

If you want to use actions, then the functions $regexp(), $strstr(), $left(), $if(), $eql() and so on can do their work.

The rule "if album_v1 matches album_v2, delete album_v1" would be scripted as:
Action "Format value"
Field: ALBUM_ID3V1
Formatstring: $if($eql(%ALBUM%,%ALBUM_ID3V1%),,%ALBUM_ID3V1%)
This will remove the ALBUM_ID3V1 tag field, if both tag fields have identical content, otherwise leave the old content there.

Corrected misspelling in Formatstring.

Detlev I think your method to copy an Id3v1 field to ID3v2 leads to the removal of all v2 tag fields that are not in the v1 tag.
You need to export the v1 tag to a text file and import it from there.

The filter can also compare tag fields.

Detlev, please don't get me wrong, I am really thankful for your help, but you don't use any commonly accepted terminology, thus your tips ("pull up field content from the ID3v1 tag onto the level and into the view of the ID3v2 tag") remain unintelligible. I followed your link but when executing steps 1-7 all you make mp3tag do is deleting the v2 fields and replace them with the content of their v1 counterparts and adding a TXXX field with description="ARTIST_ID3V1" and value= the id3v1 artist field.

.... so ??

I have no idea how this would be of any use generally speaking.
And I have still less of an idea how this would be of any help in the present case.

Provided that it's not too much work, could you just give concrete instructions as to what steps exactly I would have to make in order to solve scenario A, or - preferably - scenario B ?

as I mentioned above, I followed Detlev's instructions and the v1 fields overwrite their v2 counterparts.

I don't know if this is related to this thread's topic, but in case it is not, then it would be better to discuss that in the other thread, please.

thank you for your help dano. How can I compare title_v1 to title_v2 for example ?

I have written my respons (#6) before you edited post #4.

I have re-read #4 now and I am thankful to you for refering specifically to my problem now:

I created the action you defined above, but it didn't work. My test file (mp3) has identical album_v1 and album_v2 fields, but album_v1 was not removed.

Furthermore I don't understand

  • why ALBUM_ID3V1 is not encapsulated by percentage signs unlike the other variables in your Formatstring above
  • how come that you use %ALBUM_ID3V1% and %ALBUM_ID3V2%, as they are not defined in the list here: And I surely don't want to add additional fields to my existing tags. Quite to the contrary, I want to delete fields :slight_smile:

Dano, your concern is founded, but my suggestion uses a new field name, e. g. ALBUM_ID3V1 instead of ALBUM, so that one should never override the field content of ALBUM in tag ID3v2.

This was one of my first things ever I did with Mp3tag, and it works, even for copying ReplayGain fields from APE tag into ID3v2 tag.


I get the same results as chrizoo maybe you can check your instructions?

If you want to compare v1 against v2 in Mp3tag you have to add the v1 tags to the v2 tags.
It works by exporting the v1 tags to a text file and import them back.
Only then you can work with a custom tag field like %ALBUM_ID3V1%

Another approach that might help you:
Find all files that have different v1 and v2 tags and make a playlist of them.

Use the export to create two files that have one line for each file containing the file path and the 6 tag fields that can be in ID3v1

$filename(Compare v1.txt,utf-8)
$loop(%_path%)%_path% * %artist%-%title%-%album%-%year%-%track%-%genre%-%comment%

You could remove the %track% tag from it, it might give too many hits.

First run: Set Mp3tag to only read ID3v1, run export script

Second run: Change to read ID3v2, refresh file view and export again but with a different export file name.

Now you can use a text diff tool to compare each line.
Then export all different lines to a new file, use a text editor to remove everything after the path in each line.
Rename to m3u and you have a playlist with all files with different tags.

You can repeat the procedure with only one tag in the export file like
%_path% * %artist%
So you have all files where you must check the artist tag.

After that pre selection you could add the v1 tags to the v2 tags to make your manual comparisons. Or proceed with a different tagging tool that let's you edit both tags at the same time

chrizoo, your feedback is founded, because there were two misspellings in the Formatstring, which I have corrected in the original post.

As a two-year-old user you might have knowledge about one of Mp3tag's strength, which is the possibility to work with user definable tag fields.

Well, your basic intention is to save data, then delete data.
Doing this you need to store data temporarily in working fields.

Try to understand how Mp3tag handles different tag versions and their priority against each other(APE > ID3v2 > ID3v1). It may help to think of a stack of tags, where the lowest stage is ID3v1, second stage is ID3v2 and on top is APE.
Mp3tag cannot handle two tag versions at the same time in the user's list view (but Winamp can).
There are possibilities covered in the Tools/Options/Tags/Mpeg dialog to read one tag version, but write to the other tag version (my proposal makes use of it).

Therefore I speak from "pulling up" tag field content from ID3v1 tag into ID3v2 tag, of course it is a copying process, and not a moving process.
Afterwards you have copied all the tag field content from the lower ID3v1 level into the current ID3v2 level by creating new tag fields of course, otherwise you would overwrite existing tag fields, you can handle these new fields within the ID3v2 tag level.

Understand that Mp3tag cannot display and work with tag fields from different tag versions at a time.
My proposal works around this caveat.
The advantage is that the data always remains in the file and an export and import is not necessary.

When you are ready with your work, you can remove all tag fields, which are not needed any longer, you might also remove the ID3v1 tag completely.


Important addendum!

It has just turned out, that my proposal of copying tag field values from the ID3v1 Tag into the ID3v2 Tag will only work to satisfactory, if one can live with the loss of content from a possibly existing ID3v2 Tag.
In other words, my proposal is only good for fresh files, which carry only an ID3v1 Tag, whose fields should be copied into a new ID3v2 Tag.

Although Mp3tag can be set to not removing a complete Tag structure, it does the removing implicitely when Mp3tag is set to write to a specific Tag structure but did not read this specific Tag structure previously. In this situation Mp3tag behaves as if there is no such Tag structure in the file yet and it will create a new one.

My condolences for all the trouble when trying out my proposal!

I will vow to spread my advices to the world no longer with the sandwich in one hand and the cup of Coffee in the other hand.
Hold me in good memory.


thank you for trying to help. I PMed you in order to avoid getting further off-topic here.

As you didn't address the above, I guess that these variables/placeholders are not existing by default in MP3Tag but you only TXXXed them, right ? That's really a pity because variables such as %album_id3v1% and %title_id3v2% would be unbelievably helpful in mp3tag, if they were supported by default (i.e. if %album_id3v1% pointed to the id3v1 tag's album field and not to a id3v2 tag's TXXX field).

Sadly, yes. But I would have expected mp3tag to be able to handle v1 and v2 tags via filters and actions.

@dano #10: your post was very useful. thank you. I will reply later on.

This nearly six years old topic was the closest I found to what I am looking for.

Being uinformed about ID3v1 and ID3v2 point whatever, I have just tagged on using whatever application at hand, including from Windows Explorer. I can only guess that I must at some instances have written to ID3v1 and other times to ID3v2 and yet other times to both.

I did learn how to search using foobar2000 and found that none of my files have both ID3v2.3 and ID3v2.4. From what I have heard, they should not, that is good.

So my first-best would be the following:
Identify the files for which the ID3v1 tags are a subset of the ID3v2.x tagset. That is, when the ID3v2 has identical information to what is in ID3v1, and possibly then some in addition. Those are the files where I know I can safely delete ID3v1. And then I can see how many are left.

Any help?

If you have a look at the standard columns in MP3tag you may find a column called "Tag" which shows which tag versions are stored in a file.
You can filter or sort the contents of the column e.g.
%_tag% HAS V1 AND NOT %_tag% HAS V2
will show you all the files with just V1 tags.

V2 tags always overwrite whatever is stored in V1 tags, even for display.
Also, some fields are not available for V1 like ALBUMARTIST or covers or COMPOSER.
And: V1 tags are limited in their length, so that some data may be truncated.

If you have a lot of files where you see e.g. no artist, and you have both tags in the files, set the options for reading in
that you do not read V2 tags and see if you have anything stored in V1 tags.
After saving that information, you will have the V1 information also in the V2 tags.

Or what you could do:
First read only V1 tags, create an export of the data, including the filename
read only V2 tags and create another export of the V2 data.
Now compare the relevant fields with an external application.

This I did not understand and it is potentially very interesting. Care to elaborate?

Exporting and manually comparing is not what I am after - I have thousands of files.

MP3tag has a hierarchy in respect to tag versions:
Provided, you have set MP3tag to read all tags and write V2 and V1, the following can be observed:
If you have V2 and V1 tags in a file, MP3tag will display only the contents of the V2 fields. If you now save the data the contents of the V2 fields is written to the V2 tag and the V1 tag - they are now in sync.

So if you do not care what was stored in the V1 tags, you could simply load all the files, press save once and all your files should have V2 and V1 tags with the same contents (more or less, restrictions apply to length etc).

But if you want to see first which information was/is more accurate, that in the V1 tags or that in the V2 tags, you will not find a quicker way than to read each tag version, store them somehow and then do the comparison.

Ah yes: if you have files that have only V1 tags but you have set MP3tag to write V1 and V2, then saving the file again will create the V2 tags out of the V1 data.

OK. That is Mp3tag-specific behaviour. So if I had tagged everything with Mp3tag in the first place - which I have not - I would have known what. I need to check out the default "view behaviour" and "write behaviour" of a whatever applications I have been using then.