Author Topic: Issue with geotagging  (Read 1683 times)

stefano.tetto

  • Newbie
  • *
  • Posts: 4
Issue with geotagging
« 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:
Code: [Select]
<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

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3806
Re: Issue with geotagging
« Reply #1 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 tag only refers to EXIF gps tags.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

stefano.tetto

  • Newbie
  • *
  • Posts: 4
Re: Issue with geotagging
« Reply #2 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:
Code: [Select]
---- 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 Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16727
    • ExifTool Home Page
Re: Issue with geotagging
« Reply #3 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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

stefano.tetto

  • Newbie
  • *
  • Posts: 4
Re: Issue with geotagging
« Reply #4 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)?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16727
    • ExifTool Home Page
Re: Issue with geotagging
« Reply #5 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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

stefano.tetto

  • Newbie
  • *
  • Posts: 4
Re: Issue with geotagging
« Reply #6 on: August 13, 2016, 05:29:30 PM »
thanks a lot!