Help Organizing EXIF Data on Photos in macOS

Started by Converseallstar95, December 23, 2017, 01:27:20 AM

Previous topic - Next topic

Converseallstar95

Hi,

So I've been going through all the photos in my Photo Library on my Mac and adding locations/adjusting times, but I found that when exporting the images, the new data is not saved. Thus I have to export the image, then use ExifTool to change the location and date/time, then re-import it and delete the old image. I use "SetExifData" with ExifTools 10.68 rather than the command line because I am not experienced in it; however, SetExifData doesn't seem to work with videos (.mp4/.mov). I can see from here (https://exiftool.org/forum/index.php?topic=5977.0) that it works, but I need help with the code (assigning a geolocation to a video), and specifically an iOS Live Photo like here (https://exiftool.org/forum/index.php/topic,8750.msg44950.html#msg44950).

I have a few questions:
Is this the normal behavior and/or is there a fast/better way to do this?
What command do I use on a video? - I tried looking here (https://exiftool.org/geotag.html#Examples) and here (https://exiftool.org/forum/index.php/topic,4888.0.html) but I'm not that experienced with command line
Regarding iOS Live Photos, do I have to geotag both the photo and the video?

Thanks in advance!

Phil Harvey

ExifTool writes only XMP to MP4/MOV vidoes, so whatever you are using to read the geolocation must support XMP.

The command is the same as for writing to other files, except that for XMP the coordinates are signed and the reference directions aren't written.  So the command is something like this:

exiftool -gpslatitude=xxx -gpslongitude=yyy FILE

See FAQ 14 for the format of xxx and yyy.

- 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 ($).

Converseallstar95

Hi Phil, thanks for the help. Here is what I tired but when I imported it into Photos, there was no location attached. Any ideas?

exiftool -xmp:gpslatitude=XX.XXXXXX -xmp:gpslongitude=-XX.XXXXXX /Users/XXXXXX/Desktop/untitled\ folder\ 3/IMG_3682.mp4

I looked at a .MOV file that had a location already attached in SetExifData and there were three categories: File, QuickTime and Composite
When I looked at the .MP4 that I added the XMP data too it had; File, QuickTime, XMP, Composite

The .MOV has GPS info in the QuickTime section, then .MP$ has GPS info in the XMP section. Both have it in the composite section. Maybe this is the issue?

Phil Harvey

Yes, that is the problem.  ExifTool currently has only limited write ability for videos, and can't yet add QuickTime tags.  :(

- 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 ($).

Converseallstar95

Oh ok, interesting. Do you know of any program that would do that? Apple's photo programs (iPhoto, Aperture, Photos) cannot save changes on export (it creates an additional "layer" from what I can understand).

I've found this, but I can't seem to find GPS info, if it is there at all. - http://www.applesolutions.com/bantha/MH.html

Regarding Live Photos, both the .mov and the .jpg have GPS information, so I would need a program to edit QuickTime metadata to add locations to Live Photos. :/

Thanks for the help!

Phil Harvey

Live photos are even more complicated, but they are based on the QuickTime format so that may work, but they also store metadata in (yet another) different location inside the QuickTime container.  This is the main reason that ExifTool doesn't add tags to QuickTime files -- there is no consistency in how this information is stored amongst the various file types that use this format.

- 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 ($).

Converseallstar95

For anyone else who comes across this post:

I've managed to get location for Live Photos (and QuickTime metadata), by using the program QT Edit from Digital Rebellion. From this post (https://exiftool.org/forum/index.php?topic=7826.0)

Find the photo in the Photos library archive "IMG_XXXX" then find the matching .MOV in the folder structure "jpegvideocomplement_XXXX"
Copy them to the desktop
Then get the GPS coordinates and add them to the photo (I used SetExifData) and the video (QT Edit)
Replace the files from the original folders
Quit Photos then re open it and AirDrop them to your iPhone
Your iPhone will show the updated location in the Live Photo
Then sync the photo back to Photos on your Mac

Yes its convoluted but I only had a few, as the GPS is added into all newer photos.