coolharsh55
coolharsh55

Reputation: 1199

C library to generate / extract metadata for file types (audio OR image Or etc)

the objective is to extract metadata from file types. I know about these: TagLib for audio files Exiv2 for images (but this is for C++)

  1. I'm not sure about TagLib working properly for C programs. I could not find something of that order too.
  2. Exiv2 is a C++ library.

Do you know any libraries I can use with C programs? Or if there are other libraries, how do I interface them with my C program?

Upvotes: 0

Views: 4038

Answers (3)

Lothar
Lothar

Reputation: 13067

If possible Adobes XMP library should be used for portability among the terrible fragmentation of the metadata world.

Adobe published an source code SDK to not only read but also modify the metadata.

https://en.wikipedia.org/wiki/Extensible_Metadata_Platform

Upvotes: 0

coolharsh55
coolharsh55

Reputation: 1199

  • The libexif C EXIF library is a library written in pure portable C. It reads and writes EXIF metainformation from and to image files.
  • GNU Libextractor is a library used to extract meta data from files. GNU libextractor uses helper-libraries (plugins) to perform the actual extraction. As a result, GNU libextractor can be extended simply by installing additional plugins. Currently, libextractor supports the following formats: HTML, MAN, PS, DVI, OLE2 (DOC, XLS, PPT), OpenOffice (sxw), StarOffice (sdw), FLAC, MP3 (ID3v1 and ID3v2), OGG, WAV, S3M (Scream Tracker 3), XM (eXtended Module), IT (Impulse Tracker), NSF(E) (NES music), SID (C64 music), EXIV2, JPEG, GIF, PNG, TIFF, DEB, RPM, TAR(.GZ), LZH, LHA, RAR, ZIP, CAB, 7-ZIP, AR, MTREE, PAX, CPIO, ISO9660, SHAR, RAW, XAR FLV, REAL, RIFF (AVI), MPEG, QT and ASF. Also, various additional MIME types are detected.
  • The Metadata Extraction Tool was developed by the National Library of New Zealand to programmatically extract preservation metadata from a range of file formats like PDF documents, image files, sound files Microsoft office documents, and many others.
  • TagLib is a library for reading and editing the meta-data of several popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.

Upvotes: 3

KSletmoe
KSletmoe

Reputation: 1017

This is a very vague question. For images some common C libraries include: LibExif for reading Exif metadata, Libtiff for reading TIFF files (and their metadata), libgeotiff to read geodata from GeoTIFF files, and so on. It highly depends on what file types you are trying to read metadata from (and what types of metadata you are trying to read).

Upvotes: 0

Related Questions