I wrote these because the apps and suggestions I tried before lacked either live photos, or the YYYY/MM
file structure I wanted to organize my photos.
This requires:
- Homebrew (or, in Linux, if you're running the conversion there, you need imagemagick 7+,
cd Downloads && sudo apt-get install libjpeg-dev libtiff-dev libwebp-dev libheif-dev && wget http://www.imagemagick.org/download/ImageMagick.tar.gz && tar -xzvf ImageMagick.tar.gz && cd ImageMagick-* && ./configure --with-heic=yes --with-webp=yes --with-jpg=yes --with-png=yes && make && sudo make install && sudo ldconfig /usr/local/lib
) - Node v14+
- The two files here (I put them in
~/Downloads/
) - Exporting your iCloud Photos originals, with the moments subfolder. I exported them all to
~/Downloads/iCloud Photos Export
.
After having your export:
- Run
npm install moment
. Feel free to removenode_modules
,package.json
, and thepackage-lock.json
files after you finish #3. - Run
node export-formatter.js
once (make sure you update line 6 with your directory, if you didn't place the files like I mentioned above), it should be pretty quick (I had ~11k files, ~50GB). - Run
node export-converter.js
once if you want to convert yourMOV
files toMP4
and yourHEIC
files toJPG
. This one will be slow because it converts movie by movie and image by image, synchronally and sequentially. I did this intentionally, even though it's slower (NOTE: This will delete the original files and just keep the converted ones).
You'll end with your photos exported nicely to a structure of YYYY/MM/original-file-name.jpg
, including Live Photos (still + video), all in jpg
and mp4
formats.