I am trying what I think is a very simple command to change the value of one tag without success. Suspecting it might be due to OneDrive, I copied file to a local directory but got similar results. (The difference was the instead of editing the existing file, it created a second file (and renamed first with "mp4_original" extension). However the tag data was unchanged in both files.
C:\Users\johns\OneDrive\_Albums\Americas\Brazil 2023-06-05\Video>exiftool -GPSLatitude=-17.275756 20230604_072715.mp4
1 image files updated
C:\Users\johns\OneDrive\_Albums\Americas\Brazil 2023-06-05\Video>exiftool -n -GPSLatitude 20230604_072715.mp4
GPS Latitude : -17.2931
You should be using the command in FAQ #3 (https://exiftool.org/faq.html#Q3). Odds are that there are multiple GPS tags in the file and depending upon the group they are in, they may not be editable.
Depending upon the camera, the
GPSLatitude might be in the EXIF block. But because EXIF is non-standard in video files, exiftool may not be able to edit it. Additionally, even if exiftool can edit the
EXIF:GPSLatitude tag, you are not editing the
EXIF:GPSLatitudeRef tag which contains the reference direction. The
EXIF:GPSLatitude cannot hold a negative number and the North (positive)/South (negative) direction is read from the
EXIF:GPSLatitudeRef.
The most likely place that exiftool is reading GPS coordinates from in a video file is the
Quicktime:GPSCoordinates tag. This tag will contain both the Latitude and Longitude, including the reference direction, in a single tag. But this is further complicated by the fact that the
GPSCoordinates can appear in three different Quicktime subgroups,
Keys:GPSCoordinates,
ItemList:GPSCoordinates, or
UserData:GPSCoordinates.
The command in FAQ 3 will show you any tags with duplicate names and the actual locations they belong too. When you don't include the
-a (
-duplicates) option (https://exiftool.org/exiftool_pod.html#a---a--duplicates---duplicates) and the
-G (
-groupNames) option (https://exiftool.org/exiftool_pod.html#G-NUM-:NUM...--groupNames), the only result exiftool will show you is the
Composite:GPSLatitude tag, which is a tag exiftool creates on the fly by reading any of the above listed tags, whichever one appears last in the file.
On the other hand, the command you are using to write the
GPSLatitude is almost certainly being written to yet another GPS location,
XMP:GPSLatitude.
Quote from: johnsko on June 15, 2023, 07:27:16 PM(The difference was the instead of editing the existing file, it created a second file (and renamed first with "mp4_original" extension).
Exiftool never directly edits a file in place. It always creates a new file, and renames the original. From the docs
QuoteBy default the original files are preserved with _original appended to their names -- be sure to verify that the new files are OK before erasing the originals.
The backup files can be suppressed by adding the
-overwrite_original option (https://exiftool.org/exiftool_pod.html#overwrite_original).
Hi John, building on what @StarGeek was saying, as there are multiple groups of tags EXIF, XMP, QuickTime, etc tags are often duplicated and the same data ends up being stored in multiple places in the file. A tip that I sometimes overlook myself, is the value is just getting a plain read out from EXIFTool of all the data in the file (which is doubly-ironic for me, as despite all I've learnt it's the simplest EXIFtool command possible)...
> EXIFtool 20230604_072715.mp4
> EXIFtool -s 20230604_072715.mp4 <-- If you prefer tag names
So, for example to check all the places your GPS data might be hiding, you can do...
> EXIFtool -s 20230604_072715.mp4 | findstr /c:GPS
GPSCoordinates : 67 deg 34' 10.52" N, 5 deg 7' 27.22" W
GPSLatitude : 67 deg 34' 10.52" N
GPSLongitude : 5 deg 7' 27.22" W
GPSPosition : 67 deg 34' 10.52" N, 5 deg 7' 27.22" W
PS: I'm a relatively new EXIFtool / forum user myself and I definitely relate to what it's like when a new tool doesn't work like you expect and the learning curve just seems so steep, but have to say the forum team here is great and have learnt so much thanks to people like @StarGeek and @Phil, just keep playing with EXIFtool and ask when you get stuck, and it will start to click into place sooner than you might think 👍🏼