dhowden / tag

ID3, MP4 and OGG/FLAC metadata parsing in Go
BSD 2-Clause "Simplified" License
555 stars 71 forks source link

Provide AIFF metadata detection #68

Open AlphaJack opened 4 years ago

AlphaJack commented 4 years ago

I was wondering if you could support reading standard ID3 tags from .aiff and .aif files, as unlike .wav they don't use RIFF/ID3 tags.

dhowden commented 4 years ago

This hasn't been implemented because I don't have any AIFF files in my music library, and so have never needed it :-).

If you can point to the metadata spec and provide a few sample files then it would be a great start. From my brief search just now I couldn't put my finger on a spec, though it seems [1] that some files have a "chunk" containing ID3 data (which we already parse, so could be straightforward to implement).

[1] https://en.wikipedia.org/wiki/Audio_Interchange_File_Format#Metadata

deluan commented 4 years ago

Any file downloaded from Bandcamp as AIFF can be used as sample (and some are available for free).

If you don't have/want to but any from them, I can send you some samples. Just add a thumbs-up to this reply and I send it to your email - You can download for free the linked albums from BandCamp!

AlphaJack commented 4 years ago

@dhowden Due to the size I have uploaded a sample file here. It's an aiff file tagged in ID3v2.4 with Mp3Tag.
I also think that the implementation should be straightforward, since iTunes, Pioneer DJ devices and some car computers can read the tags without problem.

dhowden commented 4 years ago

Thanks @deluan @AlphaJack. Any luck finding a spec?

deluan commented 4 years ago

Maybe this could help? https://exiftool.org/TagNames/AIFF.html

Sorry, but I haven't spent time digging into low level tag formats, just high level using your library and ffmpeg

EDIT: Just downloaded this exiftool and it properly extract all info from the AIFF I linked before, so I assume their documentation is correct :)

deluan commented 4 years ago

I found the same information as you about AIFF containing a ID3 'chunk' from a different source: http://fileformats.archiveteam.org/wiki/AIFF

AlphaJack commented 4 years ago

Maybe this can help: https://github.com/beetbox/beets/issues/250