Hi everyone,
I’ve been working on an initial C2PA metadata extraction implementation for LocalSearch and would appreciate feedback on whether the concept makes sense for the project before opening a merge request.
C2PA is a Linux Foundation standard for recording the origin and editing history of digital media. Adopters include Adobe, Microsoft, Google, Meta, OpenAI, Sony, Leica, Nikon, and Truepic. Notably, images generated by major AI services such as OpenAI ChatGPT, Google Gemini, and Microsoft Bing Image Creator include C2PA records, as do photos taken with some devices, including the Google Pixel 10 and various cameras from Leica, Sony, Canon, and Fujifilm.
The current branch is here:
The implementation:
- Adds an optional
c2pa-c-ffiMeson dependency. - Uses the C2PA SDK’s C API to read manifests from files.
- Adds C2PA support to JPEG, PNG, GIF, TIFF, WebP, MP3, and the generic libav audio/video extractor.
- Projects selected metadata onto existing LocalSearch properties:
- active manifest instance ID →
dc:identifier c2pa.created.when→nie:contentCreated- software agent →
nie:generator
- active manifest instance ID →
- Preserves metadata from existing extractors when already available.
- Includes unit tests and functional fixtures for the supported formats.
- Leaves C2PA disabled automatically when the dependency is unavailable.
The main open issue is dependency distribution. The C2PA project currently publishes the native library and header, but not pkg-config metadata, and, as far as I know, c2pa-c-ffi is not currently packaged by any Linux distribution. For local testing I used the official Linux release and supplied a temporary .pc file outside the repository.
Some questions you might want to consider are:
- Whether using
c2pa-c-ffias an optional system dependency is the right integration model. - Whether the selected mappings onto existing LocalSearch properties are appropriate.
- Whether the generic libav integration is preferable to adding format-specific hooks.
- Whether the dependency packaging issue should be resolved through distribution packaging or elsewhere before a LocalSearch merge request.