Extract GPS from Sony A7iii MP4 & add Quicktime GPS tags & Adobe XMP GPS tags?

Started by lukemp4gps, November 12, 2020, 03:16:54 PM

Previous topic - Next topic

lukemp4gps

Using this command:

exiftool -config join_tags.config '-GPSLatitude<$XML:Latitude $XML:LatitudeRef' '-GPSLongitude<$XML:Longitude $XML:LongitudeRef' '-UserData:GPSGoordinates<$XML:Latitude $XML:LatitudeRef, $XML:Longitude $XML:LongitudeRef' C0001.MP4

I thought it was writing the user data ...

Phil Harvey

There is no such tag "UserData:GPSGoordinates" :P

Sorry.  I perpetuated your typo when I cut-and-pasted in one of my posts.

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

lukemp4gps

Of course ... feel dumb but thanks for checking that.

The GPS Coordinates only has 2 decimal places.

[UserData]      GPS Coordinates                 : 41 deg 29' 19.67" N, 81 deg 33' 34.31" W
[XMP-exif]      GPS Latitude                    : 41 deg 29' 19.68" N
[XMP-exif]      GPS Longitude                   : 81 deg 33' 34.31" W
[Composite]     GPS Latitude                    : 41 deg 29' 19.67" N
[Composite]     GPS Longitude                   : 81 deg 33' 34.31" W
[Composite]     GPS Latitude Ref                : North
[Composite]     GPS Longitude Ref               : West
[Composite]     GPS Position                    : 41 deg 29' 19.67" N, 81 deg 33' 34.31" W

lukemp4gps

I still couldn't get the GPS to show the location in Google Photos so I dug around the forums some more. Some people said that Google Photos needs an altitude so I put 0 in for altitute. Othes said that it reads Quicktime:GPSCoordinates or Keys:GPSCoordinates.  I tried all of these with no luck so far.

Current command setting all the tags:

exiftool -config join_tags.config '-GPSLatitude<$XML:Latitude $XML:LatitudeRef' '-GPSLongitude<$XML:Longitude $XML:LongitudeRef' '-UserData:GPSCoordinates<$XML:Latitude $XML:LatitudeRef, $XML:Longitude $XML:LongitudeRef, 0'  '-Quicktime:GPSCoordinates<$XML:Latitude $XML:LatitudeRef, $XML:Longitude $XML:LongitudeRef, 0'  '-Keys:GPSCoordinates<$XML:Latitude $XML:LatitudeRef, $XML:Longitude $XML:LongitudeRef, 0' C0001.MP4

Output:

[ItemList]      GPS Coordinates                 : 41 deg 29' 19.67" N, 81 deg 33' 34.31" W, 0 m Above Sea Level
[UserData]      GPS Coordinates                 : 41 deg 29' 19.67" N, 81 deg 33' 34.31" W, 0 m Above Sea Level
[Keys]          GPS Coordinates                 : 41 deg 29' 19.67" N, 81 deg 33' 34.31" W, 0 m Above Sea Level
[XMP-exif]      GPS Latitude                    : 41 deg 29' 19.68" N
[XMP-exif]      GPS Longitude                   : 81 deg 33' 34.31" W
[Composite]     GPS Altitude                    : 0 m
[Composite]     GPS Altitude Ref                : Above Sea Level
[Composite]     GPS Latitude                    : 41 deg 29' 19.67" N
[Composite]     GPS Longitude                   : 81 deg 33' 34.31" W
[Composite]     GPS Latitude Ref                : North
[Composite]     GPS Longitude Ref               : West
[Composite]     GPS Position                    : 41 deg 29' 19.67" N, 81 deg 33' 34.31" W


I was curious what videos taken by my cell phone have set for GPS so I downloaded one. It only used the UserData with no altitude setting.

Phil Harvey

The displayed number of decimals has nothing to do with the stored resolution.  Use -n to see the coordinates in decimal degrees with no rounding.

My tests with Google Photos showed that Photos displayed UserData:GPSCoordinates as written by ExifTool 12.11 with or without an altitude.  It is possible all of the other junk is confusing Photos.  Start with a clean file and just write UserData:GPSCoordinates using 12.11.  Use a file with a new name so Google doesn't cache the metadata from an old file (just to be safe).

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

lukemp4gps

Quote from: Phil Harvey on November 30, 2020, 09:42:46 PM
Use a file with a new name so Google doesn't cache the metadata from an old file (just to be safe).

I thought that might be a problem and was trying with multiple test files yesterday. Apparently I just didn't have enough patience for Google to go through all the metadata as it was processing the clip.  If the clip is still "black" on the preview then it wasn't working. This morning the preview shows a still frame and the location tagging works, even with the Bridge GPS tags.

Thanks so much for the help.