Search code examples
c++mp3decodingid3

ID3v1 tag in MP3 format


I am trying (or just started) to write music player from scratch (starting with MP3 format) and thus I have a question about the ID3v1/1.1 tag.
Let's take a field from the tag, let's say, song title. It has 30 characters (bytes) and there is my question, is '\0' already counted in it or do I have to add another byte for null?


Solution

  • As all artists doesn't have a 30 character name it is said that if there is some bytes left after the information is entered in the field, those bytes should be fille with the binary value 0.

    See ID3v1-Spec.

    I would say, the same principle can be applied to the other fields(title, album,...).