M4A genre parsing in TagLib 1.6

Lukáš Lalinský lalinsky at gmail.com
Thu Oct 29 16:38:16 CET 2009


On Thu, Oct 29, 2009 at 4:11 PM, patrick machielse <patrick at hieper.nl> wrote:
> Hi,
>
> I'm using TagLib 1.6 to parse tags in aac/m4a files. The metadata for
> these has been edited with iTunes (9.x) (this will be the most likely
> scenario for this type of files, I suppose).
>
> I have noticed that the String returned for genre() is consistently
> different (wrong) for _some_ genres. For example:
>
> iTunes 'Alternative' => TagLib reads 'Ska'
> iTunes 'Ska' => TagLib reads 'Death Metal'
>
> However, on genres such as 'Alternative & Punk' and 'Classical' iTunes
> and TagLib are in complete agreement...
>
> Is this a known issue (not pointing a finger to either iTunes or
> TagLib)? Is there a build option to default to iTunes genres, or is
> there some other solution?

No, it isn't a known issue. There are two ways to store genre in MP4
files, as text or as ID3v1 genre number. The textual ones are read
correctly, the problem is with the numeric ones. ID3v1 indexes them
from 0, MP4 apparently from 1. The code currently assumes they are
indexed from 0 and incorrectly looks them in the the ID3v1 genre
table.

-- 
Lukas Lalinsky
lalinsky at gmail.com


More information about the taglib-devel mailing list