ExifTool Forum

ExifTool => Newbies => Topic started by: stefano.tetto on August 13, 2016, 02:48:43 AM

Title: Issue with geotagging
Post by: stefano.tetto on August 13, 2016, 02:48:43 AM
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?
Title: Re: Issue with geotagging
Post by: StarGeek on August 13, 2016, 03:46:51 AM
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 (http://www.exiftool.org/TagNames/GPS.html) tag only refers to EXIF gps tags.
Title: Re: Issue with geotagging
Post by: stefano.tetto on August 13, 2016, 04:08:59 AM
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?
Title: Re: Issue with geotagging
Post by: Phil Harvey on August 13, 2016, 07:35:04 AM
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
Title: Re: Issue with geotagging
Post by: stefano.tetto on August 13, 2016, 08:21:26 AM
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)?
Title: Re: Issue with geotagging
Post by: Phil Harvey on August 13, 2016, 01:01:58 PM
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
Title: Re: Issue with geotagging
Post by: stefano.tetto on August 13, 2016, 05:29:30 PM
thanks a lot!