MP4 with ID3v2 metadata

odefta at odefta at
Tue Nov 1 17:46:05 UTC 2016

The options presented in the previous mail were not strictly related to TagLib, I just added them
to see the various options that can be used in conjunction with the ID3V2.3 metadata.

Do you plan to support ID3v2.3 metadata for MP4 files?

You can find the description here (

ID3 version 2 meta-data can be stored in meta-boxes as defined by the ISO base media file format. In this case, a handler type of 'ID32' is used in the meta-box. The actual meta-data is either stored in one or more ID32 box(es) inside the meta-data box, or this entire set of box(es) is referenced as the primary item, and stored elsewhere.

Box Type: 'ID32'
Container: Meta box ('meta')
Mandatory: No
Quantity: Zero or more
The ID3v2 box contains a complete ID3 version 2.x.x data. It should be parsed according to specifications for v.2.x.x tags. There may be multiple ID3v2 boxes using different language codes.


aligned(8) class ID3v2Box extends FullBox('ID32', version=0, 0) {
  const bit(1) pad = 0;
  unsigned int(5)[3] language; // ISO-639-2/T language code
  unsigned int(8) ID3v2data [];


language declares the language code for the following text. See ISO 639-2/T for the set of three character codes. Each character is packed as the difference between its ASCII value and 0x60. The code is confined to being three lower-case letters, so these values are strictly positive. If there are some language fields inside ID3 tag, language must not conflict with them. Instead codes 'mul' (multiple languages) and 'und' (undetermined language) should be used in such cases.
ID3v2data binary data that corresponds to ID3v2 tag format (e.g. for v.2.4.0: and its native frames (e.g. for v.2.4.0: ID3 tag must not contain any footer information, because it is never needed. Both, ID3v2 tag format and its native frames, must use the same version of the specification. Size of this field can be derived from the box size. The version of the ID3 data may be found by inspecting it.
The ID3v2 box contains a complete ID3 version 2.x.x data. It should be parsed according to specifications for v.2.x.x tags.


October 27 2016 2:24 AM, odefta at wrote:

> This metadata is called "ID32 box".
> This it the description from an old exe file that supported that:
> For MPEG-4 files meta-data can be embedded in an iTunes compatible way, in 3GP files meta-data is
> usually embedded as asset data.
> However, both file formats allow the inclusion of ID3 tags in a so called ID32 box, which is more
> flexible and thus could be used to extend/replace the other meta-data.
> The following settings can be chosen:
> 0 - no ID32 box - only iTunes or asset meta-data (default)
> 1 - complementary - ID32 box will be used to extend iTunes or asset meta-data
> 2 - duplicate - all meta-data will be stored in an ID32 box AND as iTunes or
> asset meta-data
> 3 - only ID32 box - no iTunes or asset meta-data will be used
> October 27 2016 2:06 AM, odefta at wrote:
>> Hi,
>> I know TagLib supports MP4 headers, but I need to write also an ID3v2 header into MP4 file.
>> How can I do this using TagLib?
>> Thanks.
>> October 27 2016 12:34 AM, odefta at wrote:
>>> Thanks.
>>> Is it possible to write ID3v2 header in MP4 (AAC) files?
>>> When I am trying to do this I am receiving the following errors:
>>> TagLib: MPEG::Header::parse() -- Invalid MPEG layer bits.
>>> TagLib: MPEG::Header::parse() -- Invalid sample rate.
>>> TagLib: MPEG::Header::parse() -- Could not read the next frame header.
>>> TagLib: MPEG::Properties::read() -- Could not find a valid first MPEG frame in the stream.
>>> October 24 2016 6:29 AM, "Tsuda Kageyu" <tsuda.kageyu at> wrote:
>>>> Hi all! TagLib v1.11.1 has been released.
>>>> It is an urgent release to fix an ABI breakage. Additionally, it
>>>> includes a few bug fixes.
>>>> I'd like to thank everybody who contributed to this release.
>>>> Download:
>>>> Documentation:
>>>> Changes in this release:
>>>> * Fixed binary incompatible change in TagLib::String.
>>>> * Fixed reading ID3v2 CTOC frames with a lot of entries.
>>>> * Fixed seeking ByteVectorStream from the end.

More information about the taglib-devel mailing list