reading/writing googlefied mp4 GEO data ?

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

Previous topic - Next topic

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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

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.

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

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. 
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype