exiftool - correcting capture time and geotagging without double file copy

Started by tim_rylance, July 19, 2019, 02:26:08 PM

Previous topic - Next topic

tim_rylance

I am using exiftool to correct the capture time of my photos (usually because I forgot to set the camera clock upon arrival in another country) and to geotag the photos.

The "Tips" section of the "Geotagging with Exiftool" page (https://exiftool.org/geotag.html#Tips) tells me almost everything I need to know. It suggests two methods:


A) Use the Geosync tag to specify the time difference while geotagging. Using this technique the existing image timestamps will not be corrected, but the GPSTimeStamp tag created by the geotagging process will contain the correct GPS time:

exiftool -geosync=+00:00:32 -geotag my_gps.log C:\Images

B) First fix the image timestamps by shifting them to synchronize with GPS time, then geotag using the corrected timestamps:

exiftool -alldates+=00:00:32 C:\Images
exiftool -geotag my_gps.log C:\Images


I want the effect of B but I have been using a Raspberry Pi 3 with very slow (USB-2 only) I/O so I would like to avoid the double file copy that method B uses.

A little experimentation suggests that

exiftool -alldates+=00:00:32 -geotag my_gps.log C:\Images

corrects the timestamps but gives wrong positions because it uses the unmodified original DateTimeOriginal as the Geotime

but

exiftool -alldates+=00:00:32 -geosync=+00:00:32 -geotag my_gps.log C:\Images

seems to do the trick.

Is this OK, or am I relying on undefined behaviour?

If it is OK, perhaps the Tips section could mention this third method (or variation of the second method.)

I do have a Raspberry Pi 4 now, which has USB-3 and is much faster. But avoiding the double copy will still save me several minutes each day - and on the Pi 3 it will save several tens of minutes.

Phil Harvey

Quote from: tim_rylance on July 19, 2019, 02:26:08 PM
exiftool -alldates+=00:00:32 -geosync=+00:00:32 -geotag my_gps.log C:\Images

seems to do the trick.

Is this OK, or am I relying on undefined behaviour?

This is good.  You could also have used the -globaltimeshift option, but then you would have had to specify -geotime<datetimeoriginal to use the shifted value (because by default, the unshifted datetimeoriginal# would be used).

QuoteIf it is OK, perhaps the Tips section could mention this third method (or variation of the second method.)

Done.

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