Sunday, March 07, 2021

Importing photos from Apple Photos to Adobe Lightroom Classic

I've been really disappointed with Big Sur (Mac OS v11). Neither the 11.1 or 11.2 release have allowed my laptop to  work correctly with my Apple Thunderbolt display and there have been various little bugs that should have been fixed by a .2 release. What really made my decision to move away from it though was how Apple continuously obfuscates your data files. I think it is smart to have collection folders like the Photos Library that look to the average user like one file, but for the advanced user you can go inside and find your files nicely organized. Now though files are in folders buried in within system files and named with what look like GUIDs.

 However there are many reasons to want to transition from Photos to Lightroom. You might have a lot of photos and want to store them on multiple devices (external drives, NAS, etc) and Lightroom allows you to bring all of those together. Also Photos is really great with a reasonable number of photos but when you have over tens of thousands or even hundreds of thousands photos you need to step it up. Also I read about a compelling workflow for using Photos for your favorite photos that sync to all your devices and keeping your archive in Lightroom.

Whatever your reason for transitioning there is no push button option for Lightroom Classic. For the newer Lightroom that uses cloud storage there is an import from Photos, but Classic only supports the ancient iPhoto. I spent a lot of time looking for a solution and found a really helpful post by BertL. The process wasn't ideal for me (I have mainly JPEGs for which Lightroom doesn't use XMP sidecars), but I saw a comment by Rob Allen that led me to his solution. 

On Rob Allen's blog he has a great write up on his migration process. He put together scripts and though some do not work on newer versions of the Mac OS, he pointed to a Python program, OSXPhotos, that does work well.

Basically what appears below is Rob Allen's process but fleshing out the details a tiny bit for Big Sur. Essential to this process is the OSXPhotos Python program.

Ingredients

  • Adobe Lightroom Classic v9.4 (on High Seria, OS v10.13.6)
  • Apple Photos v6 (on Big Sur, OS v11.2.1)
  • exiftool - used by OSXPhotos
  • OSXPhotos - extracts files with keyword data from Photos
  • collection-creator plugin
  • Comfort level using Terminal
Recipe
  1. Install homebrew using Terminal:
    git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
  2. Install exiftool - go to https://exiftool.org/ and download and install the MacOS Package.
  3. Install OSXPhoto. You may be better off using pipx via Terminal as the instructions suggest, but I downloaded the source and then ran setup via Terminal:
    cd Desktop/osxphotos-master
    python3 setup.py install

  4. Run OSXPhoto. Details of how the Python script command is put together are here. Within this command you'll see that exiftool is being used. This is what I ran in Terminal:
    osxphotos export ~/Desktop/photos --sidecar xmp --keyword-template "PhotosExport>{folder_album(>)}" --exiftool
  5. Use rsync to copy all of the exported files from my Big Sur computer to an external drive:
    rsync -aE ~/Desktop/photos /Volumes/seagate/photos\ export\ big\ sur\ w\ xif
  6. Plug in the external drive to the High Seria computer
  7. Run Import in Lightroom Classic using the Copy function so that it will take the file from the external drive and copy it to the local drive. I had over 70,000 photos so this took somewhere around 16 hours. I didn't time it and likely you'll have a faster computer than the old one that I run High Seria on.
  8. Check the keywords in Lightroom Classic. You should see your old keywords along with the folders named "PhotosExport ..." They will arrange in a keyword hierarchy based on the Apple Photos folder structure based on the ">" used during export in step 4.
  9. In Lightroom rename the keyword "PhotosExport" to "_Keywords To Become Collections". This is necessary for the next step, so that the correct keywords are used as collection names.
  10. Install and run the Lightroom plug-in, collection-creator. Instructions are on the Git page.
  11. Now the keywords will show up as collections with the same hierarchy preserved.