News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Exiftool Geotagging Creating Duplicate Raw Files

Started by James_F, June 28, 2020, 07:28:35 PM

Previous topic - Next topic

James_F

Newly registered user but have used Exiftool for geotagging successfully over the past year. However, one issue that I cannot solve is that when I use Exiftool to add GPX data containing GPS location data (from a GPX file saved to my desktop from my Garmin eTrex) to a folder of Nikon NEF raw files which do not have GPS data in the metadata, Exiftool creates a completely duplicated NEF file.

For example. I shot a series of five (5) Nikon test shots in raw (NEFs) saved to an external memory card. A sample file name of one of the shots is DSC_1234.NEF which was shot at 2:30 pm (I offer the time to help one understand what is happening). When I then mounted the card on my Mac a few minutes later, launched Terminal and ran Exiftool to geotag the test files, it changed the name of the original file to "DSC_1234.NEF_Original" (the one shot at 2:30 pm) and then created a new file with the same name as the original file, i.e. DSC_1234.NEF with the time stamp of when I ran terminal (3:00 pm) - the time when I geotagged it. In other words, it replaced the original file, renamed it to add "Original" after the NEF file extension, and also created a replacement file. Why is it doing this? The issue I have is both files show having the same file size - 26.9 mb so if I had a lot of files I have a space limitation issue. Can I eliminate the duplication problem? Is my terminal command wrong? 

The terminal commands I used - Jim@MBP2015 ~ % exiftool -geotag /Users/Jim/Documents/Photography/Garmin\ GPX\ Acrhives/Track_2020-06-28\ 143213.gpx  /Users/Jim/Pictures/Original\ Images/2020/Tests/20200628
    1 directories scanned
    5 image files updated

Thanks in advance for your assistance. I really do like Exiftool as it is very thorough. Jim

StarGeek

Quote from: James_F on June 28, 2020, 07:28:35 PMit changed the name of the original file to "DSC_1234.NEF_Original" (the one shot at 2:30 pm) and then created a new file with the same name as the original file,

See Writing Meta Information
   When writing information, ExifTool preserves the original file by adding "_original" to the file name.

Add the -Overwrite_Original option to your command to suppress the creation of backup files.
* 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).

Phil Harvey

Also you may want to add -P to preserve the original file modification time.

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

James_F

Thanks StarGeek and Phil for your quick response. Appreciate it. I will test out your suggested syntax in terminal and report back in order to contribute to the forum community. Thanks again, Jim

James_F

So, tested out the supplemental commands suggested by StarGeek and Phil to eliminate the creation of the "_Original" (file extension) backup copy and to preserve the original create time stamp when the image was created. Success - Works perfectly  :)

Syntax in terminal on my Mac OS X 10.15.5. was:
Exiftool[space]-geotag[space][user/documents/gpx file dragged and dropped here][space][user/pictures/image folder with images dragged and dropped here][space]-Overwrite_Original[space]-P

What I like about the "-P" optional command is that I can now maintain consistently with where and what time the GPS track data recorded my location and the time that I recorded an image at that location (assuring the camera time is set to the actual correct time).