Metadata - where to?

Fri 04 February 2011 // posts

Time ago I had a tough decision to make, while I was choosing whether to write metadata of thousands of photos to their original files or store that information in a database, leaving the original files intact. After plenty of tests and much head scratching, I chose to write metadata to the original files, mainly because of portability, and I found a way to check the integrity of the updated files.

Before going to details...I am using Ubuntu 10.04, digiKam 1.0.7 (built from the sources), exiv2 0.21, md5sum/md5deep.

The integrity check process consists of:

  1. copying the original file and the updated version to some directory.
  2. at this point, the checksum of both files doesn't match, as expected.
  3. remove ALL metadata from both files using: exiv2 -da <file>
  4. at this point, the checksum of both files should match, if not, something is wrong with the updated file

You can, very easily, build a script that checks an entire directory structure for checksum mismatches. Of course this process is useful only if you have a backup ready.

XMP-sidecar files look like a good alternative to writing metadata in image files, if you don't mind losing a bit of portability (and compatibility probably). At this moment, digiKam 1.x does not support this method. 2.x is in beta stage (that I don't trust to manage this kind of data).

If you have suggestions or alternatives, please share them.


social