Google Photos .json description only merge

Started by dart69, January 23, 2023, 07:35:27 AM

Previous topic - Next topic

dart69

Hello everyone, I am not very tech-savvy and I have tried many different techniques I have seen on this forum but I can't seem to do what it is I want to accomplish.

Basically, I have my Google Takeout images and .json files BUT I only want to merge the "description" part of the .json file to the images. I have spent hours on Google Photos adding descriptions to all my photos over the years and would like my offline backup to also have the descriptions for easy searching etc.

Any help would be greatly appreciated! Thank you.

StarGeek

Quote from: dart69 on January 23, 2023, 07:35:27 AMI have spent hours on Google Photos adding descriptions to all my photos over the years and would like my offline backup to also have the descriptions for easy searching etc.

Your command would be
exiftool -r -TagsFromFile %d%f.json -Description /path/to/files/

This will copy the Description from the json files into the matching images.  If you have some really long names, though, Google truncates the json file names (I think) to about 30 or so characters.  These you would have to do manually, replacing %d%f.json in the above command with the actual path to the json file.

This command creates backup files.  Add -Overwrite_Original to suppress the creation of backup files.
* 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).

dart69

Quote from: StarGeek on January 23, 2023, 11:39:53 AM
Quote from: dart69 on January 23, 2023, 07:35:27 AMI have spent hours on Google Photos adding descriptions to all my photos over the years and would like my offline backup to also have the descriptions for easy searching etc.

Your command would be
exiftool -r -TagsFromFile %d%f.json -Description /path/to/files/

This will copy the Description from the json files into the matching images.  If you have some really long names, though, Google truncates the json file names (I think) to about 30 or so characters.  These you would have to do manually, replacing %d%f.json in the above command with the actual path to the json file.

This command creates backup files.  Add -Overwrite_Original to suppress the creation of backup files.

First of all, thank you for replying! Although the command seems to be exactly what I'm looking for, I'm running into an error. Not entirely sure why, I have not altered anything from the original Google Takeout .zip file.


This is just a test folder but these are the contents:


And if it helps, this is the first few lines with the description from one of the images in the test folder:


Sorry to bother you again  :-\ but any help is appreciated.

grimacing-visor

The metadata file is not called IMG_0004.json it's IMG_0004.PNG.json this will need an update: %d%f.json

StarGeek

Quote from: dart69 on January 24, 2023, 06:53:01 AMFirst of all, thank you for replying! Although the command seems to be exactly what I'm looking for, I'm running into an error.

Sorry, my mistake.  I forgot that the extension is included in the json name.  So you need to use %F instead of %f, as the uppercase F includes the extension.

Try this
exiftool -r -TagsFromFile %d%F.json -Description /path/to/files/
* 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).