Write XMP sidecar and Geotag it in one go?

Started by mlc, April 29, 2024, 09:39:50 PM

Previous topic - Next topic

mlc

I have a workflow for my photo editing for which I'd like to (a) create XMP "sidecar" files from the EXIF tags in the images, and (b) write Geotagged GPS coordinates to those sidecar files.

I've managed to do this by calling the exiftool command twice:


exiftool -ext arw -o %d%f.%e.xmp -r .
exiftool -geotag FILE.gpx -geosync="12:50:44@input.xmp" *xmp


However, I poked trough the forums here and tried a bunch of combinations of these options and various -tagsfromfile and other things, and was unable to find a way to perform both of these operations with one pass through exiftool. I've managed to get sidecar files with only the GPS coordinates or with only the original metadata and no GPS tags added, but couldn't get everything all at once. Am I missing something, or should I just give up and plan to run the command twice?

Thanks for any assistance!

StarGeek

I don't have time atm to test it, but you'll want to take a look at Metadata Sidecars example #13 as your base command instead of using the -o (-out) option. Change -ext EXT to -ext arw and that will create new and/or update existing XMP files for your arw files. Then test out adding the -geosync command to that.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

mlc

Quote from: StarGeek on April 29, 2024, 09:46:15 PMI don't have time atm to test it, but you'll want to take a look at Metadata Sidecars example #13 as your base command instead of using the -o (-out) option. Change -ext EXT to -ext arw and that will create new and/or update existing XMP files for your arw files. Then test out adding the -geosync command to that.

Thanks!, I gave it a try, but either I am extremely dense, or this doesn't work.

I did

exiftool -ext arw -tagsfromfile @ -geotag ~/FILE.gpx -srcfile %d%f.%e.xmp -r .

and it "successfully" created new XMP files, but they contain only the GPS tags, not any of the other tags from the original image files. (I also tried putting -tagsfromfile @ after the -geotag ~/FILE.gpx, with the same result.)

StarGeek

Add -All to include the other tags, or use one of the xxx2xmp.args files to correctly synchronize the data.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

mlc

Quote from: StarGeek on April 30, 2024, 11:31:06 AMAdd -All to include the other tags, or use one of the xxx2xmp.args files to correctly synchronize the data.

Sorry for the delay in replying, but I was able to give it a go and this is indeed what I was looking for, thanks!

My final command:

exiftool -ext arw -tagsfromfile @ -@ exif2xmp.args -geotag ~/FILE.gpx -geosync='15:00:00@FILE.arw' -srcfile %d%f.%e.xmp -r .