quodlibet / mutagen

Python module for handling audio metadata
https://mutagen.readthedocs.io
GNU General Public License v2.0
1.52k stars 159 forks source link

Some AIFF files can't be read #541

Open Christilut opened 2 years ago

Christilut commented 2 years ago

I have a few AIFF files that mutagen can't seem to read.

I'm reading them like this:

tagfile = mutagen.File(file_path)

But then tagfile is an empty object.

See here for the file. I have more of these if needed.

Just wondering if this header is broken? Not seeing any errors though and some other programs can read it. Kid3 cannot read it but TagScanner does seem to read it fine.

phw commented 2 years ago

It's odd. For some reason it does not read the ID3 tag that is there. When writing it happily adds another ID3 chunk to the end of the file, increasing the outer AIFF chunk as expected. But when reading it only reads a COMM, FLLR and SSND chunk and nothing afterwards. I'll need to debug this closer to figure out exactly what is odd with that specific file.

Right now I'm rather certain that this is a different issue than #496 (I first suspected them to be related).

Christilut commented 2 years ago

Thanks for looking into it! And just wanted to confirm that I'm on mutagen 1.45.1.

phw commented 1 year ago

It has been a long time, but I finally looked into this. This file has an ID3 tag block tucked at the end. What mutagen supports currently is instead having a AIFF file that has a specific chunk with the name ID3 (as e.g. also supported by foobar2k and other tools).

So no, this is currently not a supported format.