GPS Data in MOV and MTS Video Files

Started by PaulS, August 05, 2018, 11:46:36 PM

Previous topic - Next topic

PaulS

Starting a new thread to discuss comments from this thread:
      https://www.photools.com/community/index.php?topic=8189.msg57538#msg57538

Quote from: Mario on August 05, 2018, 08:38:41 PM
IMatch migrates GPS data using the standard Metadata Working Group process. The end up in XMP GPS lat/lon.
if this does not work for your video containers, the problem is that they don't contain EXIF GPS data and hence ExifTool cannot migrate it into XMP.

EXIF is only for images, not video files. I don't know where MOV containers or MTS containers store GPS data. I did not even know that these containers can hold GPS records, and apparently ExifTool is also unable to find the data?

I have a Sony HDR-CX430V camcorder that produces MTS video files with GPS metadata.  I also have MOV video files from numerous iPhone models (3GS, 4, 4S, 5, 6, and 6S) that contain GPS metadata.

For these files, IMatch does import the GPS metadata and maps it to the Composite GPS tags.  However, it does not show the globe and the file location is not shown on the map.  To address this, I copy the Composite GPS tags to XMP EXIF GPS tags.

Here is my workflow:

1.  MOV or MTS file that has GPS data is added to database
2.  GPS information is automatically populated into the following tags
      {File.MD.Composite\GPSLatitude\GPSLatitude\0}
      {File.MD.Composite\GPSLongitude\GPSLongitude\0}
      {File.MD.Composite\GPSAltitude\GPSAltitude\0}
3.  Use ExifTool Command Processor to create an XMP file since it cannot write to MOV or MTS files (this step may not be needed but I have gotten inconsistent results when I don't do it)
4.  Use Metadata template to copy the variables from 2) to the corresponding XMP EXIF GPS tags:
      XMP::exif\GPSLatitude
      XMP::exif\GPSLongitude
      XMP::exif\GPSAltitude
5.  Writeback the changes to the XMP file created in 3).  At this point the globe appears and the file appears in the Map panel.

Regarding the source of the GPS data that gets mapped to the Composite GPS tags, it is different depending on the device:
   
    Sony HDR-CX430V camcorder:
     {File.MD.H264::MDPM\178\GPSLatitude\0}
     {File.MD.H264::MDPM\182\GPSLongitude\0}
     {File.MD.H264::MDPM\186\GPSAltitude\0}
   
    For the iPhones, the three GPS coordinates are contained in a single tag.  My database has 6 different QuickTime GPS tags depending on the iPhone model and possibly iOS version, however, they all map to the Composite GPS tags:
     {File.MD.QuickTime::ItemList\1.1\GPSCoordinates\0}
     {File.MD.QuickTime::ItemList\1.3\GPSCoordinates\0}
     {File.MD.QuickTime::ItemList\1.4\GPSCoordinates\0}
     {File.MD.QuickTime::ItemList\2.1\GPSCoordinates\0}
     {File.MD.QuickTime::ItemList\2.3\GPSCoordinates\0}
     {File.MD.QuickTime::UserData\\xa9xyz\GPSCoordinates\0}

If the globe display and mapping were based on the Composite GPS tags then I could eliminate this workaround and I believe this would also work for JPG files.  If this would not be too difficult, I can create a feature request.  Otherwise I will continue using the workaround.

Mario

Currently the entire GPS processing in IMatch is based on the standard GPS tags in XMP. It does not look at ExifTool's proprietary Composite tags.
This includes metadata panel, the icon, reverse geo-coding, the Map Panel, the IMatch standard categories and more. I'm not sure that changing all this in order to support proprietary metadata storage in some video container file formats will be a good idea.

Just look at the tag names:  QuickTime::UserData\\xa9xyz\GPSCoordinates\0 and even tag names with specific version numbers. This looks very proprietary and prone to change to me. I think that users affected by this can handle this with a custom-made Metadata Template easily.

It would probably be easier to change the way ExifTool maps GPS data into XMP. But that would require custom argument files which would need to be run on every import operation. Large change, I would need to know if more than one user needs this.

Add a feature request so we can see if and how many users need that.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

PaulS

It seems that Phil created the Composite tag to remap the many different GPS tags to a single tag.  As long as this tag remains available in IMatch, I can use a Metadata template to copy it to the XMP EXIF GPS tags.  I'll look into automating this on import.

At least I have confirmation now that the globe and map panel are based on the standard XMP EXIF GPS tags.

Mario

They are based on XMP GPS tags, which, for normal image files, are filled by mapping standard GPS data during the ingest.

I have never seen  Matroshka containers or Apple MOV files with GPS data. But IMatch tells ExifTool only to map GPS->XMP (and on write-back XMP->GPS) and it has no rules to search for other GPS data and map that instead. If you think this would be useful, add a feature request and provide as much info as possible. Sample files etc.

I would need to handle that internally, like, checking if XMP GPS data is empty and then start looking for the GPS Composite tags and if these are filled, mapping them to XMP manually.

If you can upload a few sample movies somewhere, this would be helpful. I have no videos with GPS data in my collection.

What happens if you make a 10 minutes video while walking or driving? How often are GPS coordinates written to the video and which coordinate to choose the "represent" the video? There is only one set of loc / dest coordinates in XMP...?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

PaulS

I'll try to upload some videos over the weekend.  The iPhone metadata contains only one GPS location (and no destination) which is the initial location.  Not sure about the Sony camcorder (yet).