Fixing Metadata after Google Takeout

Started by AbsolutLeo, May 28, 2024, 08:30:19 AM

Previous topic - Next topic

AbsolutLeo

Hey guys I have just retrieved all of my photos and videos from google photos of the last 10 years (around 4000 media files). And it came all cluttered. I have renamed all files so that every file has a unique name now and also fixed some issues with different names on the .<type>.json files in comparison to the .<type> files. Now the big question. How do I go through all files in my big folder, look if they are missing Date tags, and if so write the date tags from the associated .json file into that file.

I hope you understand what I'm trying to do!

StarGeek

Search these forums for instructions, it has been posted many times. You can find the original set of instructions on StackOverflow.  And an example of someone who was sure that Google wiped his data, but found out otherwise when they actually checked the files.

But unless you have edited the data on the Google website, there is no reason to do this, as Google has not removed any data from your files. And because Google saves the times as UTC in the JSON files, but the times in the original files were local, you would be overwriting the correct data with incorrect data.

My only advice is if you do try this, use the -wm cg (-writeMode cg) option, which will only create new tags and will not overwrite any existing tags.
* 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).

AbsolutLeo

#2
The "wiped Metadata" everyone is referring to is basically all Photos you upload that don't have metadata. Google sorts them in correctly because they just put them where you've uploaded them. But when downloaded this information only persists in the json file. Resulting in usually hundreds of files being shown sorted into the takeout day. So what I want to do is only change files that dont have metadata. So this -wm cg option is really helpful. The problem is it's still very cluttered some files have wrong suffixes some have some other issues. I'll update you guys about any progress.

P.S.:

This now works on all pictures as far as I can tell:

exiftool -r -d %s -tagsfromfile "%d/%F.json" "-DateTimeOriginal<phototakentimetimestamp" -wm cg <takeout_path>

It doesn't work on my .mov or .mp4 files though. Also a lot of them are .mp4 from Apples "Live" Videos. Is there any relevant meta data I have to consider when trying to restore them to live photos?

StarGeek

Quote from: AbsolutLeo on May 28, 2024, 10:53:12 AMIt doesn't work on my .mov or .mp4 files though. Also a lot of them are .mp4 from Apples "Live" Videos. Is there any relevant meta data I have to consider when trying to restore them to live photos?

MP4/Mov files use CreateDate instead of DateTimeOriginal. That tag is supposed to be set to UTC, so a direct copy works. If you are using Apple apps, then the CreationDate tag will also be read, but that is supposed to be set to the local time where the image was taken and includes a time zone. This isn't something you can directly copy and would need to be worked out.
* 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).