Importing .csv does not update movie GPS

Started by wywh, January 20, 2024, 11:13:27 AM

Previous topic - Next topic

wywh

I can successfully output and import movie .csv for other Keys tags but GPSCoordinates. Am I missing something obvious?

Input movie has these two Keys tags:

exiftool -a -G1 -s -n -api LargeFileSupport=1 -Keys:All movie.mp4
[Keys]          Description                     : Description
[Keys]          GPSCoordinates                  : -36.6101 -66.91515 119.9
Output them to .csv:

exiftool -a -G1 -s -n -r -csv --ext csv -api LargeFileSupport=1 -Keys:Description -Keys:GPSCoordinates . > out.csv
.csv file is:

less out.csv
SourceFile,Keys:Description,Keys:GPSCoordinates
./movie.mp4,Description,-36.6101 -66.91515 119.9

Delete all movie tags and confirm that Keys are deleted:

exiftool -overwrite_original -api LargeFileSupport=1 -All= movie.mp4
exiftool -a -G1 -s -n -api LargeFileSupport=1 -Keys:All movie.mp4

Import .csv to movie:

exiftool -overwrite_original -csv=out.csv movie.mp4
Somehow only Keys:Description is imported and Keys:GPSCoordinates is ignored:

exiftool -a -G1 -s -n -api LargeFileSupport=1 -Keys:All movie.mp4
[Keys]          Description                     : Description

In a similar manner, Composite:GPSPosition .csv import fails for both movies and images (that would be shorter than -GPS:GPSLatitude -GPS:GPSLatitudeRef -GPS:GPSLongitude -GPS:GPSLongitudeRef -GPS:GPSAltitude -GPS:GPSAltitudeRef or some wildcard variation).

- Matti

Phil Harvey

You have exported with -n but haven't used that on import.  This makes the GPSCoordinate format incompatible for writing without -n.

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

wywh

Quote from: Phil Harvey on January 20, 2024, 11:16:30 AMYou have exported with -n but haven't used that on import

Doh! That fixed it  ::)  Thanks for the speedy (3 min 3 sec) answer!

exiftool -n -overwrite_original -csv=out.csv movie.mp4
Also Composite:GPSPosition works for that for movies and images via .csv.

Would it be possible to generate also altitude in Composite:GPSPosition so all those GPS tags would be there for copy & paste?

exiftool -a -G1 -s -n -Location:All .
======== ./image.jpg
[GPS]           GPSLatitudeRef                  : S
[GPS]           GPSLatitude                     : 36.6101
[GPS]           GPSLongitudeRef                 : W
[GPS]           GPSLongitude                    : 66.91515
[GPS]           GPSAltitudeRef                  : 0
[GPS]           GPSAltitude                     : 119.9
[Composite]     GPSAltitude                     : 119.9
[Composite]     GPSPosition                     : -36.6101 -66.91515
======== ./movie.mp4
[Keys]          GPSCoordinates                  : -36.6101 -66.91515 119.9
[Composite]     GPSAltitude                     : 119.9
[Composite]     GPSAltitudeRef                  : 0
[Composite]     GPSPosition                     : -36.6101 -66.91515

- Matti

Phil Harvey

Hi Matti,

I don't want to add Altitude to GPSPosition because that change could cause problems for people already using this tag.

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

wywh

Quote from: Phil Harvey on January 20, 2024, 03:43:47 PMthat change could cause problems for people already using this tag

Understood. Altitude is quite handily available in Composite:GPSAltitude for images and movies. And handling GPSAltitudeRef might be problematic, too.

- Matti