read about this site and my work, or check the list of tags.

#code #photography #diaries

eighteen thousand photos and videos rescue

Today I learned how to recover 100 GB of old pictures from “google captivity” with just five lines of text commands in the Terminal. I used Google Photos back in the days, a Pixel phone presented some advantage with low light, and syncing pictures to the cloud disregarding privacy was not of much concern to me. Later, I cleared my Google accounts and downloaded my date with “Takeout,” only to discover that such “a takeout” is served in a form of a Mediterranean soup of zip archives and media stripped of meta-data. In other words, even when unarchived, the pictures dragged into say Apple Photos will appear in the photo-stream as if they were taken on the day of import. Apparently, Google uses separate JSON files to store the info, but such a meta-file could be in an entirely different zip-archive from a picture. From the perspective of “freedom” I could just get angry at Google for making it hard to peacefully “divorce” them. And it took me several years to overcome this feeling of being “set up,” but then there is a way to resolve that. I used the first script I found on the GitHub, and I guess there are several, and perhaps some others provide better data retention or may even offer a graphical user interface.

unzip '*.zip' -d /Volumes/drive/takeout
npm install --global yarn
git clone https://github.com/mattwilson1024/google-photos-exif.git
yarn
yarn start --inputDir /Volumes/drive/takeout --outputDir /Volumes/drive/output --errorDir /Volumes/onetb/error

“TIL” is a type of note I make for myself. Hence, I don’t comment on code or commands much, and do not create any step-by-step guides. I’m glad if it helped you. If you found a better solution, please comment, and if there’s no response option, you can always email me.