Search code examples
mp3lamemp3

Are the ID3v2.4 frame flags really completely different from ID3v2.3?


In the file "id3v2.3.0.txt", section 3.3.1, it reads:

The flags field is defined as follows.

     %abc00000 %ijk00000

… whereas in the document "id3v2.4.0-structure.html", section Frame Header Tags, it reads:

The flags field is defined as follows (l and o left out because ther resemblence to one and zero):

%0abc0000 %0h00kmnp

So, in ID3v2.3 bits for flags "abc" are bit 7‥5 while in ID3v2.4 "abc" are bit 6‥4? And the other flag bits are similarly different between both ID3v2 versions?

Is this true? Are documentations right here? So the whole set of flags changed, thereby dropping backwards compatibility?

Your answer is appreciated.


Solution

  • Yes, the documentation is right. Yes, the flag positions are incompatible between versions 2.3 and 2.4.

    This was done because in 2.3 when flags a, b and c were set and the previous byte (of the frame size) would also be 0xFF (effectively all bits set) it would resemble to the 11 bit signature of an audio frame's beginning. Which might confuse a player/decoder. Which is also said in the "changes" document:

    3. Tag structure changes:
    To avoid false synchronisations in the frame header the size description and flag field has been rewritten [S:4].

    This was taken care of in 2.4 by leaving the highest bit of a byte left unset - that's also the reason why the frame size in 2.3 takes 32 bit and only 28 bit in 2.4, which you have to take into account anyway, but didn't address for incompatibility (a common mistake among tagger programs, as I've experienced).

    Version 2.4 is technically the better solution (also because it supports UTF-8 for text). Players/decoders usually don't cause havok when wrongly identifying an audio frame which shouldn't be one, but there's also no need to push one's luck.