News:

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

Main Menu

Issue with geotagging

Started by stefano.tetto, August 13, 2016, 02:48:43 AM

Previous topic - Next topic

stefano.tetto

Dear all,
I am trying to add GPS info to a mp4 file but I am unsuccessful and I am driving crazy (I also trying with XMP to a mov file with no success) 

exiftool -fast -q -overwrite_original -EXIF:GPSLatitude=45.67 -EXIF:GPSLongitude=0.398 -EXIF:GPSVersionID=2.2.0.0 -EXIF:GPSMapDatum=WGS-84 trial.mp4

the if I print:
exiftool -h trial.mp4 | grep GPS

I see:

<tr><td>GPS Latitude</td><td>45 deg 40&#39; 12.00&quot; N</td></tr>
<tr><td>GPS Longitude</td><td>0 deg 23&#39; 52.80&quot; E</td></tr>
<tr><td>GPS Map Datum</td><td>WGS-84</td></tr>
<tr><td>GPS Version ID</td><td>2.2.0.0</td></tr>
<tr><td>GPS Latitude Ref</td><td>North</td></tr>
<tr><td>GPS Longitude Ref</td><td>East</td></tr>
<tr><td>GPS Position</td><td>45 deg 40&#39; 12.00&quot; N, 0 deg 23&#39; 52.80&quot; E</td></tr>


But if I print:
exiftool -gps:all trial.mp4

No output, and in fact any software is able to find GPS info in trial.mp4. I played with GPS map datum and version (with/without these but no difference). Where is the mistake?

StarGeek

I don't think you can put EXIF data in a video file. 

Run this command (-gps* removes the need to pipe through grep)
exiftool -g1 -a -s -gps* trial.mp4

You'll probably find that the tags are in other groups, probably XMP or Quicktime.  Probably Composite group as well, which are derived from other tags and not actually part of the file.  The GPS:all tag only refers to EXIF gps tags.
* 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).

stefano.tetto

Hi,
I was assuming that for mp4 there is a R/W support for EXIF, IPTC and XMP as stated here:
http://www.exiftool.org/index.html#supported

Actually trying your command:
exiftool -g1 -a -s -gps* trial.mp4

I get this (promising) output:

---- XMP-exif ----
GPSLatitude                     : 45 deg 40' 12.00" N
GPSLongitude                    : 0 deg 23' 52.80" E
GPSMapDatum                     : WGS-84
GPSVersionID                    : 2.2.0.0
---- Composite ----
GPSLatitudeRef                  : North
GPSLongitudeRef                 : East
GPSPosition                     : 45 deg 40' 12.00" N, 0 deg 23' 52.80" E


does it mean that actually trial.mp4 is correctly geotagged? Maybe the file got like that when I tried XMP.
In the support file list I see also EXIF for mp4, I was interested in any video file with EXIF support since for instance google photos and other applications don't seem to support XMP.

Does anybody know a video file where one could add EXIF geotag?

Phil Harvey

ExifTool can only write EXIF if it already exists in the MP4 (it is not "R/W/C" support).  EXIF in MP4 is proprietary, and only written by some camera models, so I don't think this would be useful to you anyway.

ExifTool can currently only create the XMP GPS tags in MP4 files.

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

stefano.tetto

Thanks a lot,
now I understand better!

can you confirm that same scenario is for .mov? I mean is EXIF possible for .mov (if already present) or same issue as MP4 due to proprietary things? Definitively XMP works for .mp4 and .mov right?

Lastly, given the output given by exiftool command (posted on trial.mp4), is that output meaning that the file is correctly has a correct geotag (XMP)?

Phil Harvey

MP4 and MOV are the same container format, so all the same rules apply.

From your output, the file looks like it was tagged properly with the XMP GPS tags.

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

stefano.tetto