Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Smart Album based on obscure EXIF tags?

Hi,


I'm cleaning mis-tagged photos in my library and am looking for a way to create a smart album based on some more-obscure EXIF/IPTC tags. Does Aperture have this capability? For instance, I'd like to identify all photos in the library for which the "GPS Time Stamp" tag is not set (or, alternatively, the "GPS Satellites" tag is not set). However, this tag is not included in the drop-down list of tags from the EXIF "rule" in the "Create Smart Album" dialog. Is there any way to manually specify tags?


(For a bit more context: after a recent trip, I discovered that geotags that were based on one of my two GPSs are incorrect due to a timezone issue. Due to the differences in the geocoding workflow between the two GPS units, the tags mentioned above make it easy to tell which photos were tagged by which. (One unit is camera-top, the other is a simple logger.) It's pretty easy to tell for an individual file using Exiftool, however I have 1000+ files scattered through 30+ photo sessions/folders and manually-one-by-one isn't really an option.)


Many thanks in advance for any tips!

iMac, OS X Mavericks (10.9.1)

Posted on Jan 20, 2014 7:21 AM

Reply
15 replies

Jan 20, 2014 7:46 AM in response to Mike G.

Unfortunately if the EXIF tag is not in the drop down then Aperture is unaware of its existence.


GPS version is no help I suppose? If you haven't done any major work to these images in Aperture yet you're best bet would be to export the originals and do the work in EXIF.


Another thought is to make the images referenced, move the originals out of the library (this can be temporary). Once the files are out of Aperture you can go through them with Exiftool and either correct them or mark them in some way that Aperture will see and then do the correction back in Aperture.


Once you were done using EXIFtool on them you could consolidate them back into the library.

Jan 20, 2014 7:50 AM in response to Frank Caggiano

Thanks. I agree that relocating the originals to a single folder, processing them, then re-consolidating them makes life easier. Unfortunately I'm still too much of an exiftool lightweight to do something like "for each of these 1000 files, if 'GPS Satellites' is unset, then add the keyword 'HeyApertureThisIsTheFileYoureLookingFor'". If you happen to know, I'd be grateful!


Thanks,


Mike

Jan 20, 2014 8:21 AM in response to Mike G.

I can probably come up with something later today if no one else jumps in before.


It would be a help if I had one of the files so I could test it out with Exiftool. Would it be possible for you to post one of the files, maybe dropbox or something similar?


If that is not possible then what you are looking for is a way to identify in Aperture all files that have an empty GPS Time Stamp field, correct?

Jan 20, 2014 8:33 AM in response to Frank Caggiano

Hey, thanks! I'm traveling today and don't have a good way to post, but you're exactly right: I would like to identify all pictures (within a directory) that have no "GPS Time Stamp" EXIF tag set and somehow mark them in a way that Aperture can identify them. (I'm assuming this means adding a keyword, but something else would be fine too if that's difficult... maybe deleting the "GPS Direction" tag which is meaningless in files tagged using the simple logger.)


Relevant notes:

  • I don't know if there's a distinction between an EXIF tag being unset and it being set to a blank string. To clarify: if I simply type "exiftool <filename>" for a file tagged using one GPS/workflow, the output includes a line for "GPS Time Stamp" with a value next to it, whereas if I do the same for a file tagged using the other GPS/workflow, no such line appears.
  • Some files do have keywords set already. I'm happy appending an additional keyword to identify these images but I don't want to overwrite the keywords already in place.


Thank you!

Jan 20, 2014 11:33 AM in response to Mike G.

This exif command


exiftool -keywords+='No GPS TimeStamp' -if 'not $GPSTimeStamp' file


(that of course is all one line in the terminal)


will add the keyword No GPS TimeStamp to the file if the GPS TimeStamp tag is missing.


You could modify the keyword if you'd like just make sure you keep the text between the single quotes.


DON'T use this on your actual library until we know it works. So try this on a few files to make sure it does what you want.


I think the best way to use this would be to make the files in question referenced and run the exif command on the folder the referenced files are in.


To test I would get all the images you want to work this on and export those as a new library. Once you have done that make the files referenced then run the command. If all the files are in a folder file in the above command can be changed to the folder name and it should work on all files in the folder.


Once you are sure it is working you can run it on your actual library.


Also please make sure you have a backup of the library. The command is safe but better safe then sorry.


regards

Jan 21, 2014 4:23 PM in response to Frank Caggiano

This is fantastic and worked beautifully! Many thanks!


(Note to any others who may find these instructions: the method above may result in losing some existing Aperture keywords from updated files. I believe that this is because Aperture does not write its keywords to the original files... and when exiftool updates the keywords tag, aperture replaces the list of tags rather than appending. So make arrangements to back up your keywords, e.g. by creating a few (non-smart) albums containing all pictures with each relavent keywords.)


-Mike

Jan 21, 2014 5:31 PM in response to Mike G.

Glad to hear that this helped.


I'm surprised to see that your keywords weren't preserved. The -keywords+='No GPS TimeStamp' should have caused exiftool to append the keyword (that is what the += does, just having an = would cause the keywords to be replaced).


When i tested it out here the keyword was appended. Just wondering how did you do the changes? Did you make the originals referenced and then run the command or did oyu export them or …?


regards

Jan 22, 2014 6:01 AM in response to Frank Caggiano

Hi,


I relocated all of the relevant originals to a single directory, ran the exiftool command there and then re-consolidated.


Here's my suspicion of what's going on. First, here's the overall story of what I did:

  1. Import pictures into aperture
  2. Add keywords in aperture
  3. Re-locate the originals
  4. Run the exiftool
  5. (note that the original keywords have been lost -- only on the files that passed the -if condition)
  6. Re-consolidate the originals


My understanding is that when you add a keyword in aperture, it does not edit the original image file but rather adds the keyword in the Aperture metadata database. I *think* keyword is actually a single text string which aperture parses (looking for commas) to separate individual keywords. When exiftool changes this string, it does, in fact, append the "No GPS Time Stamp" keyword, but it is appending it to a blank string (since the prior keywords are stored in the Aperture metadata DB -- which exiftool isn't accessing -- rather than the original image files). Then Aperture sees the updated "Keywords" tag -- which now contains only "No GPS Time Stamp" -- and seems to replace its keyword list with the contents of this EXIF tag, rather than intelligently determining which changes were incremental and applying them.


Put another way, I think Aperture says "hey, the keywords field has been updated on this file. let me update my metadata DB to match -- which means overwriting the existing list 'PriorTag' with the string 'No GPS Time Stamp'." rather than saying "hey, this keywords field has been updated on this file. I notice it didn't use to have 'No GPS Time Stamp' included in its comma-separated list and it does now, so let's append 'No GPS Time Stamp' to the list of keywords I have for this file in my metadata DB.")


For what it's worth, I saw the same behavior if I replace 'No GPS Time Stamp' in your command with ', No GPS Time Stamp'.


But I'm all set now; thanks again!!


-Mike

Jan 22, 2014 7:11 AM in response to Mike G.

I think you are reading it right Mike. There is however a missing link. Optionally, you can tell Aperture to write some of the common metadata back to the original, including ratings and keywords. Had you have performed this optional step, I think you'd have got your keywords back after Exiftool had appended the new one.


Andy

Smart Album based on obscure EXIF tags?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.