General > Metadata

Movie GPS

(1/1)

wywh:
I was surprised how the -wm w switch acted when I was learning how to edit movie GPS.

iOS 7.1.1 mov has the following GPS tags:

[Keys]          GPSCoordinates-fin-FI           : 52 deg 30' 58.32" N, 13 deg 22' 37.20" E, 35.003 m Above Sea Level
[Keys]          GPSCoordinates                  : 52 deg 30' 58.32" N, 13 deg 22' 37.20" E, 35.003 m Above Sea Level
[UserData]      GPSCoordinates-fi               : 52 deg 30' 58.32" N, 13 deg 22' 37.20" E, 35.003 m Above Sea Level
[Composite]     GPSAltitude                     : 35.003 m
[Composite]     GPSAltitudeRef                  : Above Sea Level
[Composite]     GPSLatitude                     : 52 deg 30' 58.32" N
[Composite]     GPSLongitude                    : 13 deg 22' 37.20" E
[Composite]     GPSPosition                     : 52 deg 30' 58.32" N, 13 deg 22' 37.20" E

I have used -wm w so no unexpected extra tags are inserted. I was surprised that the following exiftool 11.99 commands delete all those listed GPS tags. Why?

exiftool -m -P -overwrite_original_in_place -wm w -GPSCoordinates="53.35, -6.266667, 35.003 m Above Sea Level" movie.mov

exiftool -m -P -overwrite_original_in_place -wm w -Keys:GPSCoordinates="53.35, -6.266667, 35.003 m Above Sea Level" -UserData:GPSCoordinates="53.35, -6.266667, 35.003 m Above Sea Level" movie.mov

Is it because there were those localized GPS tags and with them also the main GPS tags were removed?

Without -wm w that first command deletes some GPS tags and adds [ItemList] but Catalina's Photos.app 5.0 doesn't read any of these:

exiftool -m -P -overwrite_original_in_place -GPSCoordinates="53.35, -6.266667, 35.003 m Above Sea Level" movie.mov

[ItemList]      GPSCoordinates                  : 53 deg 21' 0.00" N, 6 deg 16' 0.00" W, 35.003 m Above Sea Level
[Composite]     GPSAltitude                     : 35.003 m
[Composite]     GPSAltitudeRef                  : Above Sea Level
[Composite]     GPSLatitude                     : 53 deg 21' 0.00" N
[Composite]     GPSLongitude                    : 6 deg 16' 0.00" W
[Composite]     GPSPosition                     : 53 deg 21' 0.00" N, 6 deg 16' 0.00" W

But the following command works OK. Photos.app reads the GPS OK from that Keys GPS tag (or from UserData if Keys is deleted). I noticed that if available, Photos.app seems to use that Keys or UserData GPS longitude to display the timezone overriding other metadata datetime timezones:

exiftool -m -P -overwrite_original_in_place -Keys:GPSCoordinates="53.35, -6.266667, 35.003 m Above Sea Level" -UserData:GPSCoordinates="53.35, -6.266667, 35.003 m Above Sea Level" movie.mov

[Keys]          GPSCoordinates                  : 53 deg 21' 0.00" N, 6 deg 16' 0.00" W, 35.003 m Above Sea Level
[UserData]      GPSCoordinates                  : 53 deg 21' 0.00" N, 6 deg 16' 0.00" W, 35.003 m Above Sea Level
[Composite]     GPSAltitude                     : 35.003 m
[Composite]     GPSAltitudeRef                  : Above Sea Level
[Composite]     GPSLatitude                     : 53 deg 21' 0.00" N
[Composite]     GPSLongitude                    : 6 deg 16' 0.00" W
[Composite]     Rotation                        : 180
[Composite]     GPSPosition                     : 53 deg 21' 0.00" N, 6 deg 16' 0.00" W

After using that command also the very first simple command works as expected:

exiftool -m -P -overwrite_original_in_place -wm w -GPSCoordinates="52.52, -6.266667, 35.003 m Above Sea Level" movie.mov

[Keys]          GPSCoordinates                  : 53 deg 21' 0.00" N, 6 deg 16' 0.00" W, 35.003 m Above Sea Level
[UserData]      GPSCoordinates                  : 53 deg 21' 0.00" N, 6 deg 16' 0.00" W, 35.003 m Above Sea Level
[Composite]     GPSAltitude                     : 35.003 m
[Composite]     GPSAltitudeRef                  : Above Sea Level
[Composite]     GPSLatitude                     : 53 deg 21' 0.00" N
[Composite]     GPSLongitude                    : 6 deg 16' 0.00" W
[Composite]     GPSPosition                     : 53 deg 21' 0.00" N, 6 deg 16' 0.00" W

I prefer decimal GPS which seems to only accept dots (.) instead commas (,) that some of my apps use. Decimals are automatically converted to degrees -- or is it possible to write decimals to metadata without that conversion? It seems it is also possible to use degrees by substituting the " in seconds with sec like this:

exiftool -m -P -overwrite_original_in_place -Keys:GPSCoordinates="53 deg 21' 0.00sec N, 6 deg 16' 0.00sec W, 35.003 m Above Sea Level" -UserData:GPSCoordinates="53 deg 21' 0.00sec N, 6 deg 16' 0.00sec W, 35.003 m Above Sea Level" movie.mov

- Matti

StarGeek:

--- Quote from: wywh on May 24, 2020, 09:11:04 AM ---I have used -wm w so no unexpected extra tags are inserted. I was surprised that the following exiftool 11.99 commands delete all those listed GPS tags. Why?

Is it because there were those localized GPS tags and with them also the main GPS tags were removed?
--- End quote ---

In the case of UserData:GPSCoordinates-fi, exiftool responds with this when I try to set it
Can't use country code for UserData:GPSCoordinates-fi
so it doesn't look like exiftool can write alt-lang for that tag.  So it probably gets dropped because it can't be updated.

In my test, Keys:GPSCoordinates-fin-FI gets dropped but Keys:GPSCoordinates gets updated, not removed.  I do know that alt-lang tags do get lost if they are not explicitly updated along with the default in other tags.  There isn't much in the forum history about using alt-lang tags, so I can't provide any guidance on this.


--- Quote ---I prefer decimal GPS which seems to only accept dots (.) instead commas (,) that some of my apps use. Decimals are automatically converted to degrees -- or is it possible to write decimals to metadata without that conversion?
--- End quote ---

The conversion is taking place upon extraction.  I believe it's stored in the file as a decimal, though I'm not completely sure.


--- Quote ---It seems it is also possible to use degrees by substituting the " in seconds with sec like this:
--- End quote ---

See FAQ #14.  You don't even need the extra characters.
exiftool -m -P -overwrite_original_in_place -Keys:GPSCoordinates="53 21 0.00 N, 6 16 0.00 W, 35.003" -UserData:GPSCoordinates="53 21 0.00 N, 6 16 0.00 W, 35.003"  movie.mov
would also work.

You can always set the -c (coordFormat) option to set the output as you desire or set it in the UserDefined::Options section of your .ExifTool_config file


--- Code: ---%Image::ExifTool::UserDefined::Options = (
CoordFormat => '%.8f',
);
--- End code ---

Phil Harvey:
It is quite possible that -wm w doesn't interact well with localized QuickTime tags -- I would have to think about this and run some tests.  But the expected behaviour is that existing alternate language tags are deleted if you write a tag without a language code.

- Phil

Navigation

[0] Message Index

Go to full version