reading/writing googlefied mp4 GEO data ?

Started by gibman, April 14, 2020, 08:44:18 AM

Previous topic - Next topic

gibman

hi.

I have a bunch of mp4 video files on  my computer that I wish to GEO tag before uploading them to google photos as it's very limited within google photos to geotag the files after they have been uploaded.

Thus I want to be able to geo tag my mp4 home video collection before uploading.

In order to try and gain some  knowledge on where google puts these GEO location data I tried to download a mp4 from google photos which was recently captured with my android phone.
Obviously I verified that GPS location data was intact before downloading. All good here.

Opening the file (which has been googlefied by now) locally with a hex editor I see the LANG/LONG of the file here:

  f  i  `  c  c  u  m  "    Y  a  i  [  `  Ó  S   smhd           gudta   _meta       !hdlr        mdirappl            2ilst   *©xyz   "data       +56.1918+010.0831/šfmdat   2.ÜEé½æÙH·–,Ø Ù#îïx264 - core 155 r2901 7d0ff22 € ¿Éeˆ,,_èÄrÏÿšôQ¨Ñ^ZÞj7¯÷®òšñ¢×óHòÃ


seems the geo data (+56.1918+010.0831) is saved in the data tag of the file ?
Is there any way to read/write this tag with exiftool ?

next question would be read/write the "Title" info. I was unable to find this embedded in the mp4 file though.

Phil Harvey

Yes ExifTool writes this.

See the QuickTime tags documentation.

Also, search this forum for examples of commands to write this.

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

gibman

Thanks for the feedback.

Did look at the docs.

this cmd 'exiftool" -a -G cam.mov' gives me:
[QuickTime]     User Data xyz                   : +56.1918+010.0831/

How do I write this back with some new GPS value ?
And what about those videos files that do not already have this tag "User Data xyz" tag ?
In those cases, how do I add it ?

Phil Harvey

It looks like you are running a very old version of ExifTool.  Either that or something is weird about your file.  Update to the most recent version before proceeding.  This tag should be called GPSCoordinates.

To write it, use

exiftool -gpscoordinates="<some value>" FILE

where the value is in the same format as extracted by ExifTool.

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

gibman

#4
I'm using 11.93...

ran this:
exiftool.exe -QuickTime:GPSCoordinates#="50.372821 5.893702 0" -overwrite_original google.mp4
also tried:
exiftool.exe -gpscoordinates="+57.1918+010.0832" -overwrite_original google.mp4

(random GPs values)

then for verification:
exiftool.exe -a -G google.mp4


[ExifTool]      ExifTool Version Number         : 11.93
[File]          File Name                       : google.mp4
[File]          Directory                       : .
[File]          File Size                       : 26 MB
[File]          File Modification Date/Time     : 2020:04:15 13:29:33+02:00
[File]          File Access Date/Time           : 2020:04:15 13:29:33+02:00
[File]          File Creation Date/Time         : 2020:04:14 14:32:21+02:00
[File]          File Permissions                : rw-rw-rw-
[File]          File Type                       : MP4
[File]          File Type Extension             : mp4
[File]          MIME Type                       : video/mp4
[QuickTime]     Major Brand                     : MP4 v2 [ISO 14496-14]
[QuickTime]     Minor Version                   : 0.0.0
[QuickTime]     Compatible Brands               : isom, mp42
[QuickTime]     Movie Header Version            : 0
[QuickTime]     Create Date                     : 2020:04:10 13:49:04
[QuickTime]     Modify Date                     : 2020:04:10 23:38:24
[QuickTime]     Time Scale                      : 29787
[QuickTime]     Duration                        : 21.18 s
[QuickTime]     Preferred Rate                  : 1
[QuickTime]     Preferred Volume                : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Preview Time                    : 0 s
[QuickTime]     Preview Duration                : 0 s
[QuickTime]     Poster Time                     : 0 s
[QuickTime]     Selection Time                  : 0 s
[QuickTime]     Selection Duration              : 0 s
[QuickTime]     Current Time                    : 0 s
[QuickTime]     Next Track ID                   : 3
[QuickTime]     Track Header Version            : 0
[QuickTime]     Track Create Date               : 2020:04:10 23:38:24
[QuickTime]     Track Modify Date               : 2020:04:10 23:38:24
[QuickTime]     Track ID                        : 1
[QuickTime]     Track Duration                  : 21.05 s
[QuickTime]     Track Layer                     : 0
[QuickTime]     Track Volume                    : 0.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Image Width                     : 1920
[QuickTime]     Image Height                    : 1080
[QuickTime]     Media Header Version            : 0
[QuickTime]     Media Create Date               : 2020:04:10 23:38:24
[QuickTime]     Media Modify Date               : 2020:04:10 23:38:24
[QuickTime]     Media Time Scale                : 29787
[QuickTime]     Media Duration                  : 21.05 s
[QuickTime]     Media Language Code             : und
[QuickTime]     Handler Type                    : Video Track
[QuickTime]     Handler Description             : ISO Media file produced by Google Inc. Created on: 04/10/2020.
[QuickTime]     Compressor ID                   : avc1
[QuickTime]     Source Image Width              : 1920
[QuickTime]     Source Image Height             : 1080
[QuickTime]     X Resolution                    : 72
[QuickTime]     Y Resolution                    : 72
[QuickTime]     Bit Depth                       : 24
[QuickTime]     Video Frame Rate                : 29.787
[QuickTime]     Graphics Mode                   : srcCopy
[QuickTime]     Op Color                        : 0 0 0
[QuickTime]     Track Header Version            : 0
[QuickTime]     Track Create Date               : 2020:04:10 23:38:24
[QuickTime]     Track Modify Date               : 2020:04:10 23:38:24
[QuickTime]     Track ID                        : 2
[QuickTime]     Track Duration                  : 21.18 s
[QuickTime]     Track Layer                     : 0
[QuickTime]     Track Volume                    : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Media Header Version            : 0
[QuickTime]     Media Create Date               : 2020:04:10 23:38:24
[QuickTime]     Media Modify Date               : 2020:04:10 23:38:24
[QuickTime]     Media Time Scale                : 44100
[QuickTime]     Media Duration                  : 21.18 s
[QuickTime]     Media Language Code             : eng
[QuickTime]     Handler Type                    : Audio Track
[QuickTime]     Handler Description             : ISO Media file produced by Google Inc. Created on: 04/10/2020.
[QuickTime]     Audio Format                    : mp4a
[QuickTime]     Audio Channels                  : 2
[QuickTime]     Audio Bits Per Sample           : 16
[QuickTime]     Audio Sample Rate               : 44100
[QuickTime]     Balance                         : 0
[QuickTime]     Handler Type                    : Metadata
[QuickTime]     Handler Vendor ID               : Apple
[QuickTime]     User Data xyz                   : +56.1918+010.0831/
[QuickTime]     GPS Coordinates                 : 50 deg 22' 22.16" N, 5 deg 53' 37.33" E, 0 m Above Sea Level
[QuickTime]     Media Data Size                 : 26895886
[QuickTime]     Media Data Offset               : 7959
[Composite]     Image Size                      : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     Avg Bitrate                     : 10.2 Mbps
[Composite]     GPS Altitude                    : 0 m
[Composite]     GPS Altitude Ref                : Above Sea Level
[Composite]     GPS Latitude                    : 50 deg 22' 22.16" N
[Composite]     GPS Longitude                   : 5 deg 53' 37.33" E
[Composite]     Rotation                        : 0
[Composite]     GPS Position                    : 50 deg 22' 22.16" N, 5 deg 53' 37.33" E


it only seems to update the GPS position data tag, sadly google ignores this.
The "user data xyz" is apparently untouched. Ideally I wanted to update this tag :)
Or both in fact.

Phil Harvey

This is very odd.  Send me a (small if possible) file with the User Data xyz tag and I'll take a look.  (philharvey66 at gmail.com)

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


Phil Harvey

I see now.  I was thrown because of the "UserData" in the generated tag name.  But if you check the actual location (with the -G1 option) it is in the ItemList.  I hadn't seen a ©xyz tag in the ItemList before, but I'll add support for this and you will be able read/write this as ItemList:GPSCoordinates with ExifTool 11.94 when it is released.

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

gibman

Thanks for the new release.
It appears to work when using : exiftool.exe -gpscoordinates="+57.1918+010.0832" -overwrite_original google.mp4
google photos picks this up correctly now.. awesome.

Next problem is that I have a bunch of mov/mp4 files with XMP sidecar files that all have their GPS coordinates.
In fact these XML files are created using the geotagger (tool).

here's an exerpt from on of the XMP files:
<rdf:Description rdf:about=''
  xmlns:exif='http://ns.adobe.com/exif/1.0/'>
  <exif:GPSAltitude>46/1</exif:GPSAltitude>
  <exif:GPSAltitudeRef>0</exif:GPSAltitudeRef>
  <exif:GPSImgDirection>0/1</exif:GPSImgDirection>
  <exif:GPSImgDirectionRef>M</exif:GPSImgDirectionRef>
  <exif:GPSLatitude>56,11.494524N</exif:GPSLatitude>
  <exif:GPSLongitude>10,5.013354E</exif:GPSLongitude>
  <exif:GPSMapDatum>WGS-84</exif:GPSMapDatum>
  <exif:GPSTimeStamp>1899-12-30T01:00:00Z</exif:GPSTimeStamp>
  <exif:GPSVersionID>2.2.0.0</exif:GPSVersionID>
</rdf:Description>


Is there a builtin method to extract the XMP exif tags here for Lat/Long coords and convert those to the format '+57.1918+010.0832' and then finally write it back to the mov/mp4 file (embedded quicktime tag)?

I tried:
exiftool.exe" -tagsfromfile "google.xmp" -all:all -overwrite_original google.mov
But it doesnt seem to write the quicktime GPS coordinates.

Or do I need to handle this using some scripting language?
something along the lines that reads the XMP coords, converts the GPS coords, then calls exiftool with -gpscoordinates


again thanks for your work.

Phil Harvey

Just do this:

exiftool -tagsfromfile %d%f.xmp "-gpscoordinates<gpsposition" -ext mov -ext mp4 DIR

Converting the coordinates isn't necessary.  ExifTool will handle that.  In fact, it handled the conversion for your previous command as well, since you didn't format it as expected (see FAQ 14).

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

gibman

Hi Phil

To my great surprise I have discovered that some of the MOV files uploaded to google photos are not properly parsed in terms of reading the GEO location tags.
They come up as unknown location :(

recorded using a "Canon EOS 7D" camera


exiftool -a -G "MVI_2371.MOV"
=>

[ExifTool]      ExifTool Version Number         : 12.09
[File]          File Name                       : MVI_2371.MOV
[File]          Directory                       : .
[File]          File Size                       : 61 MB
[File]          File Modification Date/Time     : 2020:05:14 20:41:52+02:00
[File]          File Access Date/Time           : 2020:11:03 09:42:40+01:00
[File]          File Creation Date/Time         : 2020:11:03 09:11:24+01:00
[File]          File Permissions                : rw-rw-rw-
[File]          File Type                       : MOV
[File]          File Type Extension             : mov
[File]          MIME Type                       : video/quicktime
[QuickTime]     Major Brand                     : Apple QuickTime (.MOV/QT)
[QuickTime]     Minor Version                   : 2007.9.0
[QuickTime]     Compatible Brands               : qt  , CAEP
[QuickTime]     Movie Header Version            : 0
[QuickTime]     Create Date                     : 2015:07:12 14:27:54
[QuickTime]     Modify Date                     : 2015:07:12 14:27:54
[QuickTime]     Time Scale                      : 25000
[QuickTime]     Duration                        : 11.04 s
[QuickTime]     Preferred Rate                  : 1
[QuickTime]     Preferred Volume                : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Preview Time                    : 0 s
[QuickTime]     Preview Duration                : 0 s
[QuickTime]     Poster Time                     : 0 s
[QuickTime]     Selection Time                  : 0 s
[QuickTime]     Selection Duration              : 0 s
[QuickTime]     Current Time                    : 0 s
[QuickTime]     Next Track ID                   : 3
[QuickTime]     Track Header Version            : 0
[QuickTime]     Track Create Date               : 2015:07:12 14:27:54
[QuickTime]     Track Modify Date               : 2015:07:12 14:27:54
[QuickTime]     Track ID                        : 1
[QuickTime]     Track Duration                  : 11.04 s
[QuickTime]     Track Layer                     : 0
[QuickTime]     Track Volume                    : 0.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Image Width                     : 1920
[QuickTime]     Image Height                    : 1080
[QuickTime]     Media Header Version            : 0
[QuickTime]     Media Create Date               : 2015:07:12 14:27:54
[QuickTime]     Media Modify Date               : 2015:07:12 14:27:54
[QuickTime]     Media Time Scale                : 25000
[QuickTime]     Media Duration                  : 11.04 s
[QuickTime]     Handler Class                   : Media Handler
[QuickTime]     Handler Type                    : Video Track
[QuickTime]     Graphics Mode                   : srcCopy
[QuickTime]     Op Color                        : 0 0 0
[QuickTime]     Handler Class                   : Data Handler
[QuickTime]     Handler Type                    : Alias Data
[QuickTime]     Compressor ID                   : avc1
[QuickTime]     Source Image Width              : 1920
[QuickTime]     Source Image Height             : 1080
[QuickTime]     X Resolution                    : 72
[QuickTime]     Y Resolution                    : 72
[QuickTime]     Bit Depth                       : 24
[QuickTime]     Video Frame Rate                : 25
[QuickTime]     Track Header Version            : 0
[QuickTime]     Track Create Date               : 2015:07:12 14:27:54
[QuickTime]     Track Modify Date               : 2015:07:12 14:27:54
[QuickTime]     Track ID                        : 2
[QuickTime]     Track Duration                  : 11.04 s
[QuickTime]     Track Layer                     : 0
[QuickTime]     Track Volume                    : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Media Header Version            : 0
[QuickTime]     Media Create Date               : 2015:07:12 14:27:54
[QuickTime]     Media Modify Date               : 2015:07:12 14:27:54
[QuickTime]     Media Time Scale                : 48000
[QuickTime]     Media Duration                  : 11.04 s
[QuickTime]     Handler Class                   : Media Handler
[QuickTime]     Handler Type                    : Audio Track
[QuickTime]     Balance                         : 0
[QuickTime]     Handler Class                   : Data Handler
[QuickTime]     Handler Type                    : Alias Data
[QuickTime]     Audio Format                    : sowt
[QuickTime]     Audio Channels                  : 2
[QuickTime]     Audio Bits Per Sample           : 16
[QuickTime]     Audio Sample Rate               : 48000
[QuickTime]     Layout Flags                    : Stereo
[QuickTime]     Audio Channels                  : 2
[QuickTime]     Compressor Version              : CanonAVC0002
[QuickTime]     Camera Model Name               : Canon EOS 7D
[QuickTime]     Firmware Version                : Firmware Version 1.2.2
[QuickTime]     GPS Coordinates                 : 43 deg 24' 8.20" N, 2 deg 26' 25.48" E
[QuickTime]     Media Data Size                 : 64417092
[QuickTime]     Media Data Offset               : 5981
[Composite]     Image Size                      : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     Avg Bitrate                     : 46.7 Mbps
[Composite]     GPS Latitude                    : 43 deg 24' 8.20" N
[Composite]     GPS Longitude                   : 2 deg 26' 25.48" E
[Composite]     Rotation                        : 0
[Composite]     GPS Position                    : 43 deg 24' 8.20" N, 2 deg 26' 25.48" E



I tried applying geodata tags by doing either of these:

exiftool -tagsfromfile %d%f.xmp "-gpscoordinates<gpsposition" -ext mov -ext mp4 .
exiftool.exe -QuickTime:GPSCoordinates#="50.372821 5.893702 0" -overwrite_original mvi_2371.mov


uploading the photo to google photos and it does not pick up the geo location at all.

Ive attached screenshot of the problematic mov file "mvi_2371.mov" .- how it looks like in the hxd hex editor.
I have an example of a mov file which has working GEO data tags, atleast from a google standpoint :)
This one is called mvi_6061.mov. also shown in the HXD editor attachment

it has the following tags:

[ExifTool]      ExifTool Version Number         : 12.09
[File]          File Name                       : MVI_6061.mov
[File]          Directory                       : .
[File]          File Size                       : 158 MB
[File]          File Modification Date/Time     : 2020:05:14 21:51:20+02:00
[File]          File Access Date/Time           : 2020:11:03 09:18:31+01:00
[File]          File Creation Date/Time         : 2020:11:03 09:18:29+01:00
[File]          File Permissions                : rw-rw-rw-
[File]          File Type                       : MOV
[File]          File Type Extension             : mov
[File]          MIME Type                       : video/quicktime
[QuickTime]     Major Brand                     : Apple QuickTime (.MOV/QT)
[QuickTime]     Minor Version                   : 0.2.0
[QuickTime]     Compatible Brands               : qt
[QuickTime]     Movie Header Version            : 0
[QuickTime]     Create Date                     : 2013:10:17 20:03:23
[QuickTime]     Modify Date                     : 2013:10:17 20:03:23
[QuickTime]     Time Scale                      : 1000
[QuickTime]     Duration                        : 29.32 s
[QuickTime]     Preferred Rate                  : 1
[QuickTime]     Preferred Volume                : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Preview Time                    : 0 s
[QuickTime]     Preview Duration                : 0 s
[QuickTime]     Poster Time                     : 0 s
[QuickTime]     Selection Time                  : 0 s
[QuickTime]     Selection Duration              : 0 s
[QuickTime]     Current Time                    : 0 s
[QuickTime]     Next Track ID                   : 3
[QuickTime]     Track Header Version            : 0
[QuickTime]     Track Create Date               : 2013:10:17 20:03:23
[QuickTime]     Track Modify Date               : 2013:10:17 20:03:23
[QuickTime]     Track ID                        : 1
[QuickTime]     Track Duration                  : 29.32 s
[QuickTime]     Track Layer                     : 0
[QuickTime]     Track Volume                    : 0.00%
[QuickTime]     Matrix Structure                : 0 -1 0 1 0 0 0 0 1
[QuickTime]     Image Width                     : 1920
[QuickTime]     Image Height                    : 1080
[QuickTime]     Media Header Version            : 0
[QuickTime]     Media Create Date               : 2013:10:17 20:03:23
[QuickTime]     Media Modify Date               : 2013:10:17 20:03:23
[QuickTime]     Media Time Scale                : 25000
[QuickTime]     Media Duration                  : 29.32 s
[QuickTime]     Handler Class                   : Media Handler
[QuickTime]     Handler Type                    : Video Track
[QuickTime]     Handler Description             : VideoHandler
[QuickTime]     Graphics Mode                   : srcCopy
[QuickTime]     Op Color                        : 0 0 0
[QuickTime]     Handler Class                   : Data Handler
[QuickTime]     Handler Type                    : URL
[QuickTime]     Handler Description             : DataHandler
[QuickTime]     Compressor ID                   : avc1
[QuickTime]     Vendor ID                       : FFmpeg
[QuickTime]     Source Image Width              : 1920
[QuickTime]     Source Image Height             : 1080
[QuickTime]     X Resolution                    : 72
[QuickTime]     Y Resolution                    : 72
[QuickTime]     Bit Depth                       : 24
[QuickTime]     Video Frame Rate                : 25
[QuickTime]     Track Header Version            : 0
[QuickTime]     Track Create Date               : 2013:10:17 20:03:23
[QuickTime]     Track Modify Date               : 2013:10:17 20:03:23
[QuickTime]     Track ID                        : 2
[QuickTime]     Track Duration                  : 29.32 s
[QuickTime]     Track Layer                     : 0
[QuickTime]     Track Volume                    : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Media Header Version            : 0
[QuickTime]     Media Create Date               : 2013:10:17 20:03:23
[QuickTime]     Media Modify Date               : 2013:10:17 20:03:23
[QuickTime]     Media Time Scale                : 48000
[QuickTime]     Media Duration                  : 29.32 s
[QuickTime]     Handler Class                   : Media Handler
[QuickTime]     Handler Type                    : Audio Track
[QuickTime]     Handler Description             : SoundHandler
[QuickTime]     Balance                         : 0
[QuickTime]     Handler Class                   : Data Handler
[QuickTime]     Handler Type                    : URL
[QuickTime]     Handler Description             : DataHandler
[QuickTime]     Audio Format                    : sowt
[QuickTime]     Audio Channels                  : 2
[QuickTime]     Audio Bits Per Sample           : 16
[QuickTime]     Audio Sample Rate               : 48000
[QuickTime]     Layout Flags                    : Stereo
[QuickTime]     Audio Channels                  : 2
[QuickTime]     Handler Type                    : Metadata Tags
[QuickTime]     Major Brand                     : qt
[QuickTime]     Minor Version                   : 537331968
[QuickTime]     Compatible Brands               : qt  CAEP
[QuickTime]     Creation Time                   : 2013-10-17T20:03:23.000000Z
[QuickTime]     Encoder                         : Lavf58.36.100
[QuickTime]     GPS Coordinates                 : 56 deg 11' 29.67" N, 10 deg 5' 0.80" E
[QuickTime]     Media Data Size                 : 165758832
[QuickTime]     Media Data Offset               : 12867
[Composite]     Image Size                      : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     Avg Bitrate                     : 45.2 Mbps
[Composite]     GPS Latitude                    : 56 deg 11' 29.67" N
[Composite]     GPS Longitude                   : 10 deg 5' 0.80" E
[Composite]     Rotation                        : 270
[Composite]     GPS Position                    : 56 deg 11' 29.67" N, 10 deg 5' 0.80" E




I even tried removing all QT tags from the mov file by using this:
ffmpeg.exe -i MVI_2371.MOV -map_metadata -1 -vcodec copy -acodec copy test.mov
then using exiftool to reapply geodata. then re-uploading to my google photos. ofcourse making sure prior to this that my other upload attemps were permanently deleted.
no effect :(

tried to convert the mov file to mp4 with handbrake with transcoding to smaller file then reapply the GEO tags on the mp4 file using the usual cmdline options as above.
no effect.


but changing the GEO data on the working file with exiftool and then re-uploading it to google and the new GEO location is picked up perfectly.
No idea what causes this. Why some of my mov files are simply ignored.

A problem with google maybe ?

I'd be happy to send you the files for further inspection.
version info : running exitftool 12.0.9.0 on windows 10 64 bit

Phil Harvey

Are you writing GPSCoordinates in the proper location?  Try using -G1 instead of -G when reading, and use the specific location when writing.

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

gibman

Thanks for the suggestions.

problematic file here with -G1 read

[ExifTool]      ExifTool Version Number         : 12.09
[System]        File Name                       : Mvi_2371.mov
[System]        Directory                       : .
[System]        File Size                       : 61 MB
[System]        File Modification Date/Time     : 2020:05:14 20:41:52+02:00
[System]        File Access Date/Time           : 2020:11:03 13:41:59+01:00
[System]        File Creation Date/Time         : 2020:11:03 09:11:24+01:00
[System]        File Permissions                : rw-rw-rw-
[File]          File Type                       : MOV
[File]          File Type Extension             : mov
[File]          MIME Type                       : video/quicktime
[QuickTime]     Major Brand                     : Apple QuickTime (.MOV/QT)
[QuickTime]     Minor Version                   : 2007.9.0
[QuickTime]     Compatible Brands               : qt  , CAEP
[QuickTime]     Movie Header Version            : 0
[QuickTime]     Create Date                     : 2015:07:12 14:27:54
[QuickTime]     Modify Date                     : 2015:07:12 14:27:54
[QuickTime]     Time Scale                      : 25000
[QuickTime]     Duration                        : 11.04 s
[QuickTime]     Preferred Rate                  : 1
[QuickTime]     Preferred Volume                : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Preview Time                    : 0 s
[QuickTime]     Preview Duration                : 0 s
[QuickTime]     Poster Time                     : 0 s
[QuickTime]     Selection Time                  : 0 s
[QuickTime]     Selection Duration              : 0 s
[QuickTime]     Current Time                    : 0 s
[QuickTime]     Next Track ID                   : 3
[QuickTime]     Media Data Size                 : 64417092
[QuickTime]     Media Data Offset               : 5981
[Track1]        Track Header Version            : 0
[Track1]        Track Create Date               : 2015:07:12 14:27:54
[Track1]        Track Modify Date               : 2015:07:12 14:27:54
[Track1]        Track ID                        : 1
[Track1]        Track Duration                  : 11.04 s
[Track1]        Track Layer                     : 0
[Track1]        Track Volume                    : 0.00%
[Track1]        Matrix Structure                : 1 0 0 0 1 0 0 0 1
[Track1]        Image Width                     : 1920
[Track1]        Image Height                    : 1080
[Track1]        Media Header Version            : 0
[Track1]        Media Create Date               : 2015:07:12 14:27:54
[Track1]        Media Modify Date               : 2015:07:12 14:27:54
[Track1]        Media Time Scale                : 25000
[Track1]        Media Duration                  : 11.04 s
[Track1]        Handler Class                   : Media Handler
[Track1]        Handler Type                    : Video Track
[Track1]        Graphics Mode                   : srcCopy
[Track1]        Op Color                        : 0 0 0
[Track1]        Handler Class                   : Data Handler
[Track1]        Handler Type                    : Alias Data
[Track1]        Compressor ID                   : avc1
[Track1]        Source Image Width              : 1920
[Track1]        Source Image Height             : 1080
[Track1]        X Resolution                    : 72
[Track1]        Y Resolution                    : 72
[Track1]        Bit Depth                       : 24
[Track1]        Video Frame Rate                : 25
[Track2]        Track Header Version            : 0
[Track2]        Track Create Date               : 2015:07:12 14:27:54
[Track2]        Track Modify Date               : 2015:07:12 14:27:54
[Track2]        Track ID                        : 2
[Track2]        Track Duration                  : 11.04 s
[Track2]        Track Layer                     : 0
[Track2]        Track Volume                    : 100.00%
[Track2]        Matrix Structure                : 1 0 0 0 1 0 0 0 1
[Track2]        Media Header Version            : 0
[Track2]        Media Create Date               : 2015:07:12 14:27:54
[Track2]        Media Modify Date               : 2015:07:12 14:27:54
[Track2]        Media Time Scale                : 48000
[Track2]        Media Duration                  : 11.04 s
[Track2]        Handler Class                   : Media Handler
[Track2]        Handler Type                    : Audio Track
[Track2]        Balance                         : 0
[Track2]        Handler Class                   : Data Handler
[Track2]        Handler Type                    : Alias Data
[Track2]        Audio Format                    : sowt
[Track2]        Audio Channels                  : 2
[Track2]        Audio Bits Per Sample           : 16
[Track2]        Audio Sample Rate               : 48000
[Track2]        Layout Flags                    : Stereo
[Track2]        Audio Channels                  : 2
[UserData]      Compressor Version              : CanonAVC0002
[UserData]      Camera Model Name               : Canon EOS 7D
[UserData]      Firmware Version                : Firmware Version 1.2.2
[ItemList]      GPS Coordinates                 : 43 deg 24' 8.20" N, 2 deg 26' 25.48" E
[Composite]     Image Size                      : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     Avg Bitrate                     : 46.7 Mbps
[Composite]     GPS Latitude                    : 43 deg 24' 8.20" N
[Composite]     GPS Longitude                   : 2 deg 26' 25.48" E
[Composite]     Rotation                        : 0
[Composite]     GPS Position                    : 43 deg 24' 8.20" N, 2 deg 26' 25.48" E


and the working file with G1 read:

[ExifTool]      ExifTool Version Number         : 12.09
[System]        File Name                       : MVI_6061.mov
[System]        Directory                       : .
[System]        File Size                       : 158 MB
[System]        File Modification Date/Time     : 2020:05:14 21:51:20+02:00
[System]        File Access Date/Time           : 2020:11:03 13:44:15+01:00
[System]        File Creation Date/Time         : 2020:11:03 09:18:29+01:00
[System]        File Permissions                : rw-rw-rw-
[File]          File Type                       : MOV
[File]          File Type Extension             : mov
[File]          MIME Type                       : video/quicktime
[QuickTime]     Major Brand                     : Apple QuickTime (.MOV/QT)
[QuickTime]     Minor Version                   : 0.2.0
[QuickTime]     Compatible Brands               : qt
[QuickTime]     Movie Header Version            : 0
[QuickTime]     Create Date                     : 2013:10:17 20:03:23
[QuickTime]     Modify Date                     : 2013:10:17 20:03:23
[QuickTime]     Time Scale                      : 1000
[QuickTime]     Duration                        : 29.32 s
[QuickTime]     Preferred Rate                  : 1
[QuickTime]     Preferred Volume                : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Preview Time                    : 0 s
[QuickTime]     Preview Duration                : 0 s
[QuickTime]     Poster Time                     : 0 s
[QuickTime]     Selection Time                  : 0 s
[QuickTime]     Selection Duration              : 0 s
[QuickTime]     Current Time                    : 0 s
[QuickTime]     Next Track ID                   : 3
[QuickTime]     Handler Type                    : Metadata Tags
[QuickTime]     Media Data Size                 : 165758832
[QuickTime]     Media Data Offset               : 12867
[Track1]        Track Header Version            : 0
[Track1]        Track Create Date               : 2013:10:17 20:03:23
[Track1]        Track Modify Date               : 2013:10:17 20:03:23
[Track1]        Track ID                        : 1
[Track1]        Track Duration                  : 29.32 s
[Track1]        Track Layer                     : 0
[Track1]        Track Volume                    : 0.00%
[Track1]        Matrix Structure                : 0 -1 0 1 0 0 0 0 1
[Track1]        Image Width                     : 1920
[Track1]        Image Height                    : 1080
[Track1]        Media Header Version            : 0
[Track1]        Media Create Date               : 2013:10:17 20:03:23
[Track1]        Media Modify Date               : 2013:10:17 20:03:23
[Track1]        Media Time Scale                : 25000
[Track1]        Media Duration                  : 29.32 s
[Track1]        Handler Class                   : Media Handler
[Track1]        Handler Type                    : Video Track
[Track1]        Handler Description             : VideoHandler
[Track1]        Graphics Mode                   : srcCopy
[Track1]        Op Color                        : 0 0 0
[Track1]        Handler Class                   : Data Handler
[Track1]        Handler Type                    : URL
[Track1]        Handler Description             : DataHandler
[Track1]        Compressor ID                   : avc1
[Track1]        Vendor ID                       : FFmpeg
[Track1]        Source Image Width              : 1920
[Track1]        Source Image Height             : 1080
[Track1]        X Resolution                    : 72
[Track1]        Y Resolution                    : 72
[Track1]        Bit Depth                       : 24
[Track1]        Video Frame Rate                : 25
[Track2]        Track Header Version            : 0
[Track2]        Track Create Date               : 2013:10:17 20:03:23
[Track2]        Track Modify Date               : 2013:10:17 20:03:23
[Track2]        Track ID                        : 2
[Track2]        Track Duration                  : 29.32 s
[Track2]        Track Layer                     : 0
[Track2]        Track Volume                    : 100.00%
[Track2]        Matrix Structure                : 1 0 0 0 1 0 0 0 1
[Track2]        Media Header Version            : 0
[Track2]        Media Create Date               : 2013:10:17 20:03:23
[Track2]        Media Modify Date               : 2013:10:17 20:03:23
[Track2]        Media Time Scale                : 48000
[Track2]        Media Duration                  : 29.32 s
[Track2]        Handler Class                   : Media Handler
[Track2]        Handler Type                    : Audio Track
[Track2]        Handler Description             : SoundHandler
[Track2]        Balance                         : 0
[Track2]        Handler Class                   : Data Handler
[Track2]        Handler Type                    : URL
[Track2]        Handler Description             : DataHandler
[Track2]        Audio Format                    : sowt
[Track2]        Audio Channels                  : 2
[Track2]        Audio Bits Per Sample           : 16
[Track2]        Audio Sample Rate               : 48000
[Track2]        Layout Flags                    : Stereo
[Track2]        Audio Channels                  : 2
[Keys]          Major Brand                     : qt
[Keys]          Minor Version                   : 537331968
[Keys]          Compatible Brands               : qt  CAEP
[Keys]          Creation Time                   : 2013-10-17T20:03:23.000000Z
[Keys]          Encoder                         : Lavf58.36.100
[ItemList]      GPS Coordinates                 : 56 deg 11' 29.67" N, 10 deg 5' 0.80" E
[Composite]     Image Size                      : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     Avg Bitrate                     : 45.2 Mbps
[Composite]     GPS Latitude                    : 56 deg 11' 29.67" N
[Composite]     GPS Longitude                   : 10 deg 5' 0.80" E
[Composite]     Rotation                        : 270
[Composite]     GPS Position                    : 56 deg 11' 29.67" N, 10 deg 5' 0.80" E


I shure hope I'm writing the GPS info in the correct places :)

Also, what do you mean by "using the specific location when writing" ?

regards
gibman

Phil Harvey

Hi Gibman,

Hmmm.  Both are written to the ItemList location, so I guess that wasn't the problem.

Did this work at one time for you?  The reason I ask is that ExifTool 12.09 added a patch to change the way GPSPosition is written for compatibility with Lightroom.  It would really suck if this broke things for Google.  Could you perhaps try a controlled tests and write GPSPosition with both 12.08 and 12.09?  12.08 is still available for download (just change the version number in the download link).

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

gibman

I tried 12.08 on the problematic file.

applied using:
exiftool.exe -QuickTime:GPSCoordinates#="50.372821 5.893702 0" mvi_2371.mov

exiftool -a -G1 "Mvi_2371.mov"

[ExifTool]      ExifTool Version Number         : 12.08
[System]        File Name                       : Mvi_2371.mov
[System]        Directory                       : .
[System]        File Size                       : 61 MB
[System]        File Modification Date/Time     : 2020:11:04 09:41:22+01:00
[System]        File Access Date/Time           : 2020:11:04 09:41:22+01:00
[System]        File Creation Date/Time         : 2020:11:03 09:11:24+01:00
[System]        File Permissions                : rw-rw-rw-
[File]          File Type                       : MOV
[File]          File Type Extension             : mov
[File]          MIME Type                       : video/quicktime
[QuickTime]     Major Brand                     : Apple QuickTime (.MOV/QT)
[QuickTime]     Minor Version                   : 2007.9.0
[QuickTime]     Compatible Brands               : qt  , CAEP
[QuickTime]     Movie Header Version            : 0
[QuickTime]     Create Date                     : 2015:07:12 14:27:54
[QuickTime]     Modify Date                     : 2015:07:12 14:27:54
[QuickTime]     Time Scale                      : 25000
[QuickTime]     Duration                        : 11.04 s
[QuickTime]     Preferred Rate                  : 1
[QuickTime]     Preferred Volume                : 100.00%
[QuickTime]     Matrix Structure                : 1 0 0 0 1 0 0 0 1
[QuickTime]     Preview Time                    : 0 s
[QuickTime]     Preview Duration                : 0 s
[QuickTime]     Poster Time                     : 0 s
[QuickTime]     Selection Time                  : 0 s
[QuickTime]     Selection Duration              : 0 s
[QuickTime]     Current Time                    : 0 s
[QuickTime]     Next Track ID                   : 3
[QuickTime]     Media Data Size                 : 64417092
[QuickTime]     Media Data Offset               : 5984
[Track1]        Track Header Version            : 0
[Track1]        Track Create Date               : 2015:07:12 14:27:54
[Track1]        Track Modify Date               : 2015:07:12 14:27:54
[Track1]        Track ID                        : 1
[Track1]        Track Duration                  : 11.04 s
[Track1]        Track Layer                     : 0
[Track1]        Track Volume                    : 0.00%
[Track1]        Matrix Structure                : 1 0 0 0 1 0 0 0 1
[Track1]        Image Width                     : 1920
[Track1]        Image Height                    : 1080
[Track1]        Media Header Version            : 0
[Track1]        Media Create Date               : 2015:07:12 14:27:54
[Track1]        Media Modify Date               : 2015:07:12 14:27:54
[Track1]        Media Time Scale                : 25000
[Track1]        Media Duration                  : 11.04 s
[Track1]        Handler Class                   : Media Handler
[Track1]        Handler Type                    : Video Track
[Track1]        Graphics Mode                   : srcCopy
[Track1]        Op Color                        : 0 0 0
[Track1]        Handler Class                   : Data Handler
[Track1]        Handler Type                    : Alias Data
[Track1]        Compressor ID                   : avc1
[Track1]        Source Image Width              : 1920
[Track1]        Source Image Height             : 1080
[Track1]        X Resolution                    : 72
[Track1]        Y Resolution                    : 72
[Track1]        Bit Depth                       : 24
[Track1]        Video Frame Rate                : 25
[Track2]        Track Header Version            : 0
[Track2]        Track Create Date               : 2015:07:12 14:27:54
[Track2]        Track Modify Date               : 2015:07:12 14:27:54
[Track2]        Track ID                        : 2
[Track2]        Track Duration                  : 11.04 s
[Track2]        Track Layer                     : 0
[Track2]        Track Volume                    : 100.00%
[Track2]        Matrix Structure                : 1 0 0 0 1 0 0 0 1
[Track2]        Media Header Version            : 0
[Track2]        Media Create Date               : 2015:07:12 14:27:54
[Track2]        Media Modify Date               : 2015:07:12 14:27:54
[Track2]        Media Time Scale                : 48000
[Track2]        Media Duration                  : 11.04 s
[Track2]        Handler Class                   : Media Handler
[Track2]        Handler Type                    : Audio Track
[Track2]        Balance                         : 0
[Track2]        Handler Class                   : Data Handler
[Track2]        Handler Type                    : Alias Data
[Track2]        Audio Format                    : sowt
[Track2]        Audio Channels                  : 2
[Track2]        Audio Bits Per Sample           : 16
[Track2]        Audio Sample Rate               : 48000
[Track2]        Layout Flags                    : Stereo
[Track2]        Audio Channels                  : 2
[UserData]      Compressor Version              : CanonAVC0002
[UserData]      Camera Model Name               : Canon EOS 7D
[UserData]      Firmware Version                : Firmware Version 1.2.2
[ItemList]      GPS Coordinates                 : 50 deg 22' 22.16" N, 5 deg 53' 37.33" E, 0 m Above Sea Level
[Composite]     Image Size                      : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     Avg Bitrate                     : 46.7 Mbps
[Composite]     GPS Altitude                    : 0 m
[Composite]     GPS Altitude Ref                : Above Sea Level
[Composite]     GPS Latitude                    : 50 deg 22' 22.16" N
[Composite]     GPS Longitude                   : 5 deg 53' 37.33" E
[Composite]     Rotation                        : 0
[Composite]     GPS Position                    : 50 deg 22' 22.16" N, 5 deg 53' 37.33" E


google still does not pick up the coordinates :(

yeah it did work at some time.
in fact it still does. But only on some files.
Other files seem to be ignored by google.

I can take the working file (MVI_6061.mov) and I can use exiftool to reapply any random GPS coords, then reupload to google and the changes are seen immediately.
I can repeat this step for as long as I like to.

Then some files plain don't work :( like is the case with the Mvi_2371.mov file.

StarGeek

I did some testing and it does look like 12.09 breaks with Google photos.

But adding an altitude also breaks Google photos.  With 12.08, using either -GPSCoordinates#="50.372821 5.893702" or -GPSCoordinates="50.372821, 5.893702" (with and without printConv) will work, but neither -GPSCoordinates#="50.372821 5.893702 0" or -GPSCoordinates="50.372821, 5.893702, 0" will work.
* 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).

Phil Harvey

Hi StarGeek,

Quote from: StarGeek on November 04, 2020, 11:31:50 AM
I did some testing and it does look like 12.09 breaks with Google photos.

Darn.  That leaves me in a bind.  Either I support Lightroom or Google Photos with the default formatting.

But from what you said, this should work with 12.09:

exiftool -GPSCoordinates="+50.3728+005.8937" FILE

(ExifTool will accept an ISO 6709 formatted value, in which case the trailing "/" is not appended.)

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

StarGeek

Quote from: Phil Harvey on November 04, 2020, 12:21:58 PM
But from what you said, this should work with 12.09:

exiftool -GPSCoordinates="+50.3728+005.8937" FILE

Yes, that does work with Google Photos. 

I did figure out something else.  Google Photos won't read ItemList:GPSCoordinates, only UserData:GPSCoordinates or Keys:GPSCoordinates.  My first test file included both ItemList and UserData, so I might have to test it all again.

I also tried adding the altitude in this way -UserData:GPSCoordinates="+50.3728+005.8937+0" and Google Photos was able to read that.

* 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).

Phil Harvey

Thanks for looking into this.   Unfortunately Lightroom also reads UserData:GPSCoordinates, but with a trailing "/" that apparently Google doesn't like (see this thread).  So it is looking like there may not be a solution that will satisfy both.

But I don't understand why writing a value with an altitude works now with the ISO 6709 format, but your commands which wrote the altitude didn't work with ExifTool 12.08.  The result should be the same.

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

StarGeek

I do some more stringent testing tomorrow.  It's entirely possible that I could have messed up some of the tests as I was editing and uploading the same file.  I'll make duplicate files, one for each condition, to make sure I didn't make any mistakes.
* 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).

Phil Harvey

OK.  Just FYI, here is how ExifTool 12.09 interprets GPSCoordinates when writing:

1. Without -n, ExifTool looks for a comma in the input string.  If a comma is found, then it converts the first 2 values to degrees in ISO 6709 format (eg. "+50.3728+005.8937/", with a trailing "/").  If there were 2 commas, the altitude is added (eg. "+50.3728+005.8937+20/").  If the value already looks like ISO 6709 format (with or without a trailing "/") it is not converted.  Note that ExifTool doesn't care about the number of digits before the decimal in this case, but there should be 2 digits before the decimal for latitude, and 3 digits for longitude (pad with 0's if necessary) -- some software is picky about this.

2. With -n ExifTool looks for coordinates in degrees separated by spaces instead of commas.  Other than this, the format is the same as with -n (ie. ISO 6709 may be used).

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

StarGeek

And now I think I'm going mad.  Or google is pranking me.

Set up a bunch of files, created a batch file so I don't make a mistake in writing files incorrectly... and...

Every file now shows the correct location, no matter the version, no matter how it's written.

I'm stepping away for the moment, then I'm going to try again, using a completely different video for each option, just in case Google is caching what I'm uploading.
* 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).

Phil Harvey

(hoping)  Maybe they fixed the problem at their end... ;)

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

gibman

with 12.09 I am still unable to have google pick up the coordinates using the exiftool cmd:

exiftool -GPSCoordinates="+50.3728+005.8937" FILE

Google is not caching it, as I've deleted the mov file before uploading the new one.
As well as emptying the trashcan.

As I said, I have some other MOV files where google is able to pickup the new coordinates.

Phil Harvey

Quote from: gibman on November 06, 2020, 03:43:46 AM
with 12.09 I am still unable to have google pick up the coordinates using the exiftool cmd:

exiftool -GPSCoordinates="+50.3728+005.8937" FILE

This is actually good news since it may indicate that there is some problem other than the trailing "/" (since the above command won't write the trailing "/").

Your above command writes Keys:GPSCoordinates, which StarGeek thinks should work, but it is worth trying UserData:GPSCoordinates as well:

exiftool -UserData:GPSCoordinates="+50.3728+005.8937" FILE

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

gibman

#25
I can confirm that it works with : exiftool -UserData:GPSCoordinates="+50.3728+005.8937" mvi_2371.mov
:)

StarGeek

Quote from: Phil Harvey on November 06, 2020, 06:48:17 AM
Your above command writes Keys:GPSCoordinates, which StarGeek thinks should work, but it is worth trying UserData:GPSCoordinates as well:

Isn't ItemList the default location?  The quicktime page says ItemList, UserData, Keys. 
* 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).

Phil Harvey

Quote from: StarGeek on November 06, 2020, 10:20:11 AM
Isn't ItemList the default location?  The quicktime page says ItemList, UserData, Keys.

Yes, sorry.  You are correct.  I'm using the example.config file which sets Keys as the preferred location.  With no config file ItemList is default.

So that would explain why the command didn't work -- you found that Google doesn't recognize ItemList:GPSCoordinates.  The the trailing "/" is still in the mix.

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

gibman

as stated previously, this works with google:
exiftool -UserData:GPSCoordinates="+50.3728+005.8937" mvi_2371.mov

but this here does not:
exiftool.exe -overwrite_original -r -tagsfromfile %d%f.xmp "-UserData:GPSCoordinates<gpsposition" -ext mov -ext mp4 .

I need this for auto applying coords to about 1000 video files :)
Would hate to do it by hand hehe.

an example XMP would look like this:

<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.08'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>

<rdf:Description rdf:about=''
  xmlns:Iptc4xmpCore='http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/'>
  <Iptc4xmpCore:CountryCode>FRA</Iptc4xmpCore:CountryCode>
  <Iptc4xmpCore:Location>Pradelles-Cabardès</Iptc4xmpCore:Location>
</rdf:Description>

<rdf:Description rdf:about=''
  xmlns:exif='http://ns.adobe.com/exif/1.0/'>
  <exif:DateTimeOriginal>2015-07-12T14:27:54</exif:DateTimeOriginal>
  <exif:GPSAltitude>787/1</exif:GPSAltitude>
  <exif:GPSAltitudeRef>0</exif:GPSAltitudeRef>
  <exif:GPSImgDirection>0/1</exif:GPSImgDirection>
  <exif:GPSImgDirectionRef>M</exif:GPSImgDirectionRef>
  <exif:GPSLatitude>43,24.136740N</exif:GPSLatitude>
  <exif:GPSLongitude>2,26.424600E</exif:GPSLongitude>
  <exif:GPSMapDatum>WGS-84</exif:GPSMapDatum>
  <exif:GPSTimeStamp>1899-12-30T00:09:21Z</exif:GPSTimeStamp>
  <exif:GPSVersionID>2.2.0.0</exif:GPSVersionID>
</rdf:Description>

<rdf:Description rdf:about=''
  xmlns:photoshop='http://ns.adobe.com/photoshop/1.0/'>
  <photoshop:City>Pradelles-Cabardès</photoshop:City>
  <photoshop:Country>France</photoshop:Country>
  <photoshop:State>Occitanie</photoshop:State>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='w'?>


is there something missing in the XMP ?

StarGeek

Google isn't reading the XMP data, it's reading the Quicktime data (I don't think it reads any XMP in video files, I'll have to double check).  And also the format is different.  The coordinates need to be in the above mentioned ISO format for that to work with version 12.09.

Download and use Exiftool ver 12.08 and you shouldn't have a problem, as that will use the older format that Google does read.  You will still need to copy to UserData:GPSCoordinates though.
* 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).

Phil Harvey

OK then.  So the "/" is the problem. :(  I guess I'll have to add a Google-compatibility option somehow.

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

gibman

yep I knew that google does not read XMP data from sidecar files :)
It was my attempt at importing and applying the XMP coordinates into the mov file itself.

Maybe Im doing the syntax wrong here ?

Phil Harvey

I've finally got around to running some tests with Google Photos.  The problem isn't the trailing "/".  It also doesn't matter what language code is used (I tried both default "UserData:GPSCoordinates" and "UserData:GPSCoordinates-eng").  The problem is that Google Photos doesn't recognize UserData:GPSCoordinates if the coordinates have fewer than 3 digits after the decimal point (stupid, stupid, stupid...).  ExifTool 12.11 will pad to 3 digits if necessary.

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

StarGeek

Ah, good to know.  I had forgotten about following up on this.
* 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).

LSPAUN

Hi Phil and wonderful community of wonderful tool,

Probably many as me are busy with some Google Photos stuff as the date of changing their storage policy comes soon.

What I want to achieve - adding GPSLocation to old mp4 files without location, or to new video clips, or correcting some wrong locations.
Exiftool (using windows, latest version) works perfectly.

However, Google Photos
- displays location OK for original video from the phone (data is in UserData:GPSLocation)
- displays location OK for downloaded videos from Google (data is in ItemList:GPSCoordinates)
- does NOT display location for any added location or modified location  (dummy or real, tried GPSCoordinates, UserData:GPSCoordinates, Keys:GPSCoordinates)

Do you know if something changed at Google Photos recently ?

Can someone give a try ?

Example of tag from original video:
exiftool -g1 -a -s -GPSCoordinates .\1.mp4
---- UserData ----
GPSCoordinates                  : 45 deg 21' 3.24" N, 6 deg 8' 32.28" E


After modifying (tried all kind of tag categories, etc),
exiftool -P -UserData:GPSCoordinates="11.664880, -3.515751" .\1.mp4                         
1 image files updated

exiftool -g1 -a -s -GPSCoordinates .\1.mp4
---- UserData ----
GPSCoordinates                  : 11 deg 39' 53.57" N, 3 deg 30' 56.70" W

But Google refuses to display the location...

LSPAUN

#35
Ok, quick reply as I found (probably) the main rootcause: Google Photos doesn't like positions in decimal degrees with more that 5 digits after the dot (funny as I remember I have seen in the forum they also require a minimum of 3 digits after the dot).

Now debugging if there is a difference between UserData:GPSCoordinates, ItemList:GPSCoordinates, Keys:GPSCoordinates.

And I have to find the correct usage of -n and -c  with -tagsFromFile for the following, somthing like this works very well:

exiftool -overwrite_original -c "%.5f" -P -tagsfromfile '%f.xmp' "-ItemList:GPSCoordinates<GPSPosition" .

(not the most accurate as it also tries to rewrite the respective .xmp file but in the end it does not as there are no changes, but I haven't find the correct way to use %f to tell from each .xmp file in the directory, apply the change to the respective filename with .mp4 extension)

My source master GPS data is stored in sidecar XMP files created by geosetter tool, example:

<exif:GPSLatitude>44,11.349680N</exif:GPSLatitude>
  <exif:GPSLongitude>5,42.882317E</exif:GPSLongitude>
  <exif:GPSMapDatum>WGS-84</exif:GPSMapDatum>

read by exiftool like

exiftool -a -g -G1 -n example.xmp
[ExifTool]      ExifTool Version Number         : 12.25
[System]        File Name                       : example.xmp
[System]        Directory                       : .
[System]        File Size                       : 1086
[System]        File Modification Date/Time     : 2021:04:16 00:57:34+02:00
[System]        File Access Date/Time           : 2021:04:25 11:37:54+02:00
[System]        File Creation Date/Time         : 2021:04:25 11:37:54+02:00
[System]        File Permissions                : 100666
[File]          File Type                       : XMP
[File]          File Type Extension             : XMP
[File]          MIME Type                       : application/rdf+xml
[XMP-x]         XMP Toolkit                     : Image::ExifTool 10.96
[XMP-exif]      Date/Time Digitized             : 2002:12:15 05:00:00+01:00
[XMP-exif]      Date/Time Original              : 2002:12:15 05:00:00+01:00
[XMP-exif]      GPS Latitude                    : 44.1891613333333
[XMP-exif]      GPS Longitude                   : 5.71470528333333
[XMP-exif]      GPS Map Datum                   : WGS-84
[XMP-exif]      GPS Date/Time                   : 2002:12:15 04:00:00Z
[XMP-exif]      GPS Version ID                  : 2.2.0.0
[XMP-photoshop] Date Created                    : 2002:12:15 05:00:00+01:00
[XMP-xmp]       Modify Date                     : 2002:12:15 05:00:00+01:00
[Composite]     GPS Latitude Ref                : N
[Composite]     GPS Longitude Ref               : E
[Composite]     GPS Position                    : 45.1891613333333 5.71470528333333

wywh

#36
Quote from: LSPAUN on April 25, 2021, 05:55:14 AM
Google Photos doesn't like positions in decimal degrees with more that 5 digits after the dot

Thanks for the info! Just recently I wondered why H.264 .mp4 displayed the location in Google Photos while a new H.265 did not. I use Keys:GPSCoordinates because iOS devices seem to use it.

And sure enough, with 6 decimals neither H.264 nor H.265 new test .mp4 displayed location but with 5 decimals they both did. FWIW I had an older H.264 with 6 decimals that shows the location but maybe Google Photos has changed after that upload.

https://exiftool.org/forum/index.php?topic=12393.0

- Matti

LSPAUN

Indeed, I remember I have seen in an earlier other post that 6 decimals were the maximum, now tested that max 5 works.

Phil Harvey

It just boggles my mind that programmers can be so stupid at Google.  In what world would 6 decimal points ever be too many?  And why even impose a restriction like this in the first place?

I wonder if those programmers can eat a pizza that is cut into 16 pieces. :/

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

StarGeek

Quote from: LSPAUN on April 25, 2021, 05:55:14 AM
Ok, quick reply as I found (probably) the main rootcause: Google Photos doesn't like positions in decimal degrees with more that 5 digits after the dot (funny as I remember I have seen in the forum they also require a minimum of 3 digits after the dot).

Thanks for figuring it out.  I was trying to test it out and getting the same lack of results.  I wouldn't have thought to have limited the number of decimals.

Quotenot the most accurate as it also tries to rewrite the respective .xmp file

Add --ext xmp to the command to exclude xmp files. See the -ext (-extension) option.
* 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).

Phil Harvey

Note that ExifTool already has a patch for writing GPSCoordinates because Google Photos didn't accept coordinates with less than 3 digits after the decimal place.  So there's also that restriction to consider.  I'm not going to test this myself, but it seems that the coordinates must have 3, 4 or 5 digits after the decimal point.  However, this also seems to be a moving target.

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