icloud-photos-downloader / icloud_photos_downloader

A command-line tool to download photos from iCloud
MIT License
6.9k stars 554 forks source link

Write exif informations from apple metadata #448

Open Se7enair opened 2 years ago

Se7enair commented 2 years ago

Summary

Adding metadata from apple photos to exif

Context

Apple or the photos app is generating metadata which contains keywords, persons, GPS location, etc. At the moment not all of them are written to the exif information in a picture. It would be nice, if there is a option like --exif to write all these data to the files. So other programs can make use of it. For example, as far as I know Adobe Lightroom is working with these, or a batch rename/move can use this.

AndreyNikiforov commented 2 years ago

What specific metadata attribute(s) from iCloud you would like to see in exif?

Can you please outline a scenario to test functionality once implemented? E.g. 1) upload photo without XYZ exif 2) check that iCloud Web UI shows ABC attribute 3) download photo and check that XYZ matches ABC data.

Se7enair commented 2 years ago

In my case I am interested in detected persons and albums. Persons because it would be easy to search for pictures from a specific person, even on my local files. albums to be able to sort the exported pictures in albums. At the moment I only can export a file structure based on the date. Or any other thing you can do in combination with exiftool. At the moment there are exif informations in a exported photo, but as far as I See, albums and persons not.

AndreyNikiforov commented 2 years ago

Persons because it would be easy to search for pictures from a specific person, even on my local files. albums to be able to sort the exported pictures in albums.

What tool are you using to search local files by exif tags? What tags does that tool use for Person & Album? I scanned https://exiv2.org/tags.html and don't see anything close to the requested metadata.

Se7enair commented 2 years ago

At the moment I export from iCloud with osxphotos it writes the information at various tags. Screenshots are from exiftool image image image

Christoph Drexler is a person, icloudpd is a album.

Apple photos is scanning my photos and add some aditional information, like persons, selfies, duplicates, etc. And I sort photos to albums. Everything happens in the cloud. As soon as I export it with icloudpd I loose these information. My target is to keep the information.

osxphotos is capable, but only runs on mac. And I have only a virtual mac which runs, but Linux on the server would be better. Because it runs 24/7.

Se7enair commented 2 years ago

https://photo.stackexchange.com/questions/129/is-there-an-exif-standard-for-tagging-people-in-photographs

I am not really familiar with these things. But I am looking for a solution to save the additional information apple is adding to my photos.

Ebseguru commented 2 years ago

I observed that icloudpd.exe under Windows is basically downloading the Metadata. However the IPTC part is missing. The reason for using icloudpd was the hope for accessing the caption, which is unfortunately part of IPTC block. Nevertheless I am not sure whether Apple already strips off this data while uploading to iCloud and icloudpd is just a victim of that unwanted behavior.

revpdev commented 1 year ago

Hi, I am interested as well in extension of the support of exif information. Specifically the adjusted GPS location (as priority 1) and detected persons (priority 2). My usecase: I am running icloudpd on both a raspberry pi as a NAS backup, and on macos to retrieve photos from another account.

AndreyNikiforov commented 1 year ago

My brief googling suggested that there are many approaches to storing metadata and XMP seems to be the preferred way for face data.

What is your experience with using XMP/Exif/etc in photo organizing software? Maybe icloudpd should support rich metadata export into XMP?

revpdev commented 1 year ago

I will update my last comment, my need was in fact more to retrieve the edited photos and videos that user can see on iPhone after edit. The adjusted date works already fine in 1.15.1. Thus my need is more related to enhancement #249 and #412 for which I could build a working solution at least for my needs. I'll follow-up in #249.