New Google JSON format

Started by theSkyIScrape, August 23, 2024, 10:59:09 AM

Previous topic - Next topic

theSkyIScrape

It seems Google has recently changed their json format for the timeline. Just checking if there is a roadmap to implement this new file format. Thank you.
  {
    "endTime" : "2024-08-19T00:00:00.000Z",
    "startTime" : "2024-08-18T22:00:00.000Z",
    "timelinePath" : [
      {
        "point" : "geo:51.512071,-0.127062",
        "durationMinutesOffsetFromStartTime" : "9"
      },
      {
        "point" : "geo:51.512892,-0.121467",
        "durationMinutesOffsetFromStartTime" : "10"
      },
      {
        "point" : "geo:51.504762,-0.113110",
        "durationMinutesOffsetFromStartTime" : "14"
      },
      {
        "point" : "geo:51.504494,-0.113642",
        "durationMinutesOffsetFromStartTime" : "15"
      },
      {
        "point" : "geo:51.502871,-0.117404",
        "durationMinutesOffsetFromStartTime" : "16"
      },
      {
        "point" : "geo:51.502824,-0.117905",
        "durationMinutesOffsetFromStartTime" : "20"
      },
      {
        "point" : "geo:51.503479,-0.118467",
        "durationMinutesOffsetFromStartTime" : "81"
      },
      {
        "point" : "geo:51.503186,-0.118141",
        "durationMinutesOffsetFromStartTime" : "83"
      },
      {
        "point" : "geo:51.503026,-0.118639",
        "durationMinutesOffsetFromStartTime" : "108"
      },
      {
        "point" : "geo:51.502818,-0.117925",
        "durationMinutesOffsetFromStartTime" : "114"
      }
    ]
  },

StarGeek

Quote from: theSkyIScrape on August 23, 2024, 10:59:09 AMIt seems Google has recently changed their json format for the timeline. Just checking if there is a roadmap to implement this new file format.

Exiftool treats all JSON files the same way. There isn't any special handling of previous Google JSON files.

Just run the command in FAQ #3 directly on the JSON file to see what data exiftool will extract.
* 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).

theSkyIScrape

Thank you. When I run using this new json file I am getting this - No track points found in GPS file './location-history.json' in File:Geotag (ValueConvInv)

Phil Harvey

Right.  The -geotag option.  I'll have to add support for the new syntax

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

theSkyIScrape

Quote from: Phil Harvey on August 23, 2024, 12:01:49 PMRight.  The -geotag option.  I'll have to add support for the new syntax

- Phil

Thank you Phil.

Phil Harvey

I've got this working and ExifTool 12.94 should have the ability to geotag from these files.  I hope to release this version within a few days.

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

theSkyIScrape

Quote from: Phil Harvey on August 28, 2024, 09:13:36 AMI've got this working and ExifTool 12.94 should have the ability to geotag from these files.  I hope to release this version within a few days.

- Phil

Thank you Phil. Eager to test it when you release.

theSkyIScrape

Quote from: Phil Harvey on August 28, 2024, 09:13:36 AMI've got this working and ExifTool 12.94 should have the ability to geotag from these files.  I hope to release this version within a few days.

- Phil

I am getting the same error. Is there something wrong with my syntax.

Command - exiftool -P -geotag 'location-history.'json '-geotime<${CreateDate}+01:00' *.CR3

Error - No track points found in GPS file 'location-history.json' in File:Geotag (ValueConvInv)
        No writable tags set from 2024-08-Ireland-0001.CR3

Phil Harvey

Could you attach the json file so I can try this out?  It works for me if I use the JSON from your first post, so something must be different.

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

theSkyIScrape

Quote from: Phil Harvey on August 31, 2024, 09:12:51 PMCould you attach the json file so I can try this out?  It works for me if I use the JSON from your first post, so something must be different.

- Phil

There are some square braces at the start and end. Please check your email that you have in your readme file. I have explained why I couldn't attach it here.

Phil Harvey

The problem was due to the fact that the GPS came much later in this file and ExifTool only parses the first 50 lines of the file to determine its type.  I've patched 12.96 to key on some information that comes earlier in this file, and it should solve the problem for now.

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

theSkyIScrape

Quote from: Phil Harvey on September 01, 2024, 02:18:04 PMThe problem was due to the fact that the GPS came much later in this file and ExifTool only parses the first 50 lines of the file to determine its type.  I've patched 12.96 to key on some information that comes earlier in this file, and it should solve the problem for now.

- Phil

Wohooo it worked. Thank you so much.