Quite a few Metadata questions

Started by AndrewWevers, January 03, 2024, 10:16:27 PM

Previous topic - Next topic

AndrewWevers

    Hi there -
    Pretty new at scripting here, so I had a few questions on what is possible, and how I would go about writing a script for ExifTool in order to get the information I needed from a bulk set of images. I am on Mac.

    I apologize in advance, as I am trying to learn this program in order to get relevant metadata to visualize it in the long run after events.

    To start, I mainly use photomechanic. I am looking to get data from a batch of images in separate folders if possible ( I can move to single folder if easier.)

    Data I need would be the following -

    • Cameras used (ex. Sony a1, Nikon z9) / count of uniques
    • Lenses used (similar to the {lt} variable in photomechanic in order to tell lens types) / Count of unique lenses (2x 70-200s, 5x 24-70's)
    • Most common focal length, or a list of them so I can average the data myself
    • A count of images per lens
    • A count of images per body
    • List of apertures,I can average data for most common after the fact
    • ISO's Used / or a count so I can average and visualize

    The last one I don't know if possible, but I would also like to see the most commonly used keyword across an entire event of images, reading the keywords from each image. This sounds like a lot to accomplish, but if it is doable I'd love to know.

I know lightroom does this in their filter tab, but I do not use lightroom and would ideally not like to import a batch of 32k+ photos to that program after the fact just for starting data.

Thanks in advance, Sorry I am completely new at this.

Edit:
I just downloaded MetaImage as listed on the ExifTool Homepage, and this seems to extrapolate all the data I could need, I just need to sort it myself.

Looks like this solves the issue, feel free to delete this post. thanks again!

Phil Harvey

The thing to do is to output a CSV-format file to a spreadsheet and do whatever analysis/plotting you want there.

The ExifTool command could look something like this:

exiftool -csv -make -model -lensid -focallength -aperture -iso -r DIR > out.csv

The -r option recursively processes images in contained subdirectories.  You can limit this to processing only specified file types using the -ext option.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).