Exiftool script getting stuck when running script on lots of files (10k+)

Started by FlameDra, August 23, 2024, 01:48:06 PM

Previous topic - Next topic

FlameDra

I have been using exiftools to organize my Google Photos backup. I use Google Takeout to download all my photos from Google, but they don't have the proper metadata in the media files and instead come with some .json files for each image which stores the actual metadata.

I found a script on this forum which works really well to put the metadata back into the media files from the .json files:

exiftool -d "%s" -tagsfromfile %d%f.%e.json "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-FileCreateDate<PhotoTakenTimeTimestamp" "-FileModifyDate<PhotoTakenTimeTimestamp" -overwrite_original -ext mp4 -ext jpg -r . -progress

I found the script on this thread. I mostly care about getting the Photo Taken and File Created dates back into the media files.


This seems to work very well on folders with smaller amounts (<1000) of media files, however I have some folders which have 10-20k photos + videos. When I run the script on these folders, it seems like it gets "stuck" and does not do anything (screenshot attached).

I ran it overnight (8ish hours) and still did not see any progress in my PowerShell and did not see the script complete. I can't tell if the script is still running and processing the files, but its just taking a long time. I don't see any of the files dates updated in the folder yet.

Does this script need much longer time to process folders which have 10-20k photos + videos? Or is it getting overwhelmed and just stopping silently?

Is there some updates I can make to the script to better optimize it for this task and run faster?
exiftool.jpg

StarGeek

Try switching to CMD. While it shouldn't be happening in this command, PowerShell doesn't play nice with a lot of standard exiftool command due to its quoting rules and escape character.

I've run exiftool on over 100k files with a single command with no problem.
"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

FlameDra

Running it on CMD and I'm actually seeing progress. Weird that it doesn't do anything on PowerShell! Thank you!

If there was an issue with PowerShell specifically interacting with quoting rules and escape characters, wouldn't it also fail when I try to use it the other folders too? It works fine on folders with <1000 images. Wonder what the actual issue is.


StarGeek

No idea what the problem would be. I've long since given up on dealing with PS's idiosyncrasies.
"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