Please store metadata in EXIF tags, if possible

Issue #1349 on hold
Former user created an issue

I have a whole bunch of home brewed scripts to take care of things such as sorting, renaming, HDR assembly and so on and so forth. These work from the EXIF tags, e.g.

Exif.CanonFi.BracketMode SShort 1 Off Exif.CanonFi.BracketValue SShort 1 0 Exif.CanonFi.BracketShotNumber SShort 1 0

which help greatly to keep large numbers of pictures manageable.

Unfortunately ML does not seem to store any of its metadata in EXIF tags, and instead creates the enfuse scripts, except if one shoots in RAW (which I do) and which have other limits (e.g. for free-hand HDR I use hugin tools for alignment first).

Would it be possible to make use of the EXIF tools (where available), store ML metadata/settings used to an Xmp.ML. range of metadata to preserve the settings in the images, or at the very least provide some form of Xmp.ML = true setting, so one knows whether this image results from ML and can make some educated guesses in trying to interpret the rest?

Comments (6)

  1. Alex

    Probably the only way would be to create exiftool scripts.

    Another proposed approach was to have a user-defined template for the scripts.

  2. Former user Account Deleted

    So you're saying you have no way to influence the writing of the files on camera?

    (Sorry for my ignorance, did not yet manage to take a closer look at the ML source code)

    You seem to be able to influence the version number displayed on camera. Perhaps you can also write that same modified version to EXIF? That way it would at least be possible for subsequent programs to know this was written by a camera using Magic Lantern.

  3. Former user Account Deleted

    Perhaps make it an option, at least?

    The other option, I guess, would be to modify files when they are on the card or later on the computer. For shots that belong to a series, e.g. HDR, ramping pictures and such, one could also think about storing their metadata along with the information of which pictures belong together.

    My first thought would be to do this as a JSON array that encodes which mode took images, which images are part of this set, as well as metadata for the entire picture and individual images (where applicable), because JSON is comparatively easy to write, and JSON parsers exist for many platforms and languages.

    I'm willing to do at least some work on this, if you give me some pointers where to start looking and where this kind of thing should go.

  4. Alex

    Here's a starting point:

    Now, to be notified when a picture is taken, probably the best way is to register a handler for PROP_FILE_NUMBER. To get a file name with the same number as the last picture, look at how movie logging or silent pictures are implemented.

    char name[100];
    snprintf(name, sizeof(name), "%s/MVI_%04d.LOG", get_dcim_dir(), file_number);

    Copyright and artist strings have len=64. See for how to change these settings.

    Or, you can simply change the file created for each HDR sequence, from shoot.c:hdr_create_script (it uses plain fprintf calls).

  5. Log in to comment