Problem with %discnumber% between mp3tag and foobar

I have been trying for a long time to consistently match the behavior of tags between mp3tag and foobar.

When editing tags in mp3tag, I am saving both id3v2.4 and apev2 tags.

Now I am facing a problem with disc numbers.

I save disc numbers in the X/Y format (disc number/total discs). When I do that in mp3tag, extended tags shows correctly the DISCNUMBER tag (X/Y). Looking at the file in a text or Hex editor, it also shows correctly the tag (TPOS X/Y).

After that, if I go to foobar and edit the tags (usually replaygain calculation) and go back to mp3tag, DISCNUMBER is gone. Instead of that, a DISC tag is shown (X/Y). And in foobar it shows 2 different tags: Disc Number (X) and Total Discs (Y). The strange thing is that, looking again in text or Hex editor, TPOS is still there (TPOS X/Y). The only diference is that places in header are changed and I get one space before TPOS and one after.

Foobar documentation reports the use of DISCNUMBER tag, not DISC, and in the same X/Y format. That would be TPOS, and, only if DISCNUMBER isn't there, it would save TOTALDISCS in a TXXX frame.

Anyone has any clue about why this is happening, and if there is a way to make disc numbers works consistently between mp3tag and foobar?

How can mp3tag report the DISC tag, instead of DISCNUMBER, if the same TPOS frame is in the file? Would the spaces before and after the frame make any difference?

Thanks in advance,

Rodrigo Martinho.

Why do you store these two tag-types in one file?

What tag-type will be read resp. written by the specific tagger application?

Get rid of the APEv2 tag-type and the problem will be gone.


I use to write both tags because I thought it would make my files more compatible with different softwares. Seems this is a mistake.

I removed the ape tags and indeed the problem disappeared. Thank you very much for pointing me that!

Later I will make further tests, including flac files, but as far as I remember this was the last compatibility problem I had across mp3tag and foobar. Now I can go on with my last tagging standard.


Rodrigo Martinho.

To be widely compatible with other software applications, use the tag-type ID3v2.3 UTF-16.
Mp3tag has a priority system for tag-types: APEv2>ID3v2>ID3v1.
Mp3tag can write data into all tag-types at once, when writing enabled, but reads only the highest available tag-type, when reading is enabled. See settings in dialog "Mp3tag/Tools/Options/Tags/Mpeg".


The problem here is that I already wrote id3v2.4 in all my files, and I use some frames that have changed from v2.3 to v2.4, as INVOLVEDPEOPLE (IPLS to TIPL) or YEAR (TYER to TDRC). And I use MUSICIANCREDITS too, which wasn't in v2.3 (TMCL in v2.4).

I know this settings, but wasn't aware of this priority system. Thanks for pointing that out too. As a test, I changed the "Write" settings from v2.4 UTF-8 to v2.3 UTF-16 and, after saving again the files' tags, it seems mp3tag replaced them correctly. Looking at a HEX Editor I see MUSICIANCREDITS frame was placed in a TXXX, as expected. Only odd thing is every string has dots between letters. But I confirmed it worked well between mp3tag and foobar, as v2.4 did. I will make further tests and, if all works fine, I'll go back to v2.3.

Thanks again,

Rodrigo Martinho.

I made further tests and completely changed my mind.

With id3 tags, foobar doesn't handle multiple values for some frames, as title and musiciancredits. Multiple values in title is something I really would like, since there are many tracks that have more than one song. With multiple values, I can filter a track by song name, even if it isn't the first song in the track.

It seems foobar won't handle this in short future and, apart this, developers in general complain about id3.

For now, I will stay only with ape2 tags, which works very simillar to vorbis comments I already use in flac files, and let me use in foobar the full tagging potencial I wish. The problem between "disc" and "discnumber" I solved with a mapping between these tag names for APEv2.

For those interested in this topic, follow a new discussion in foobar forum: