photonixapp / photonix

A modern, web-based photo management server. Run it on your home server and it will let you find the right photo from your collection on any device. Smart filtering is made possible by object recognition, face recognition, location awareness, color analysis and other ML algorithms.
https://photonix.org/
GNU Affero General Public License v3.0
1.85k stars 125 forks source link

Display Apple/iPhone Live Photos #250

Open damianmoore opened 3 years ago

damianmoore commented 3 years ago

A user asked if we display Live Photos. I assume Photonix would show the static image content but not the video part. It would be nice to allow the user to hover/click an overlayed icon when viewing the photo that would play the video and then return to the photo.

Apple have a library on NPM but it's not been updated in 2 years, could have licensing issues, is apparently error-prone, has low useage numbers and is provided as only minified JS. https://www.npmjs.com/package/livephotoskit https://developer.apple.com/live-photos/ . There are a couple of react libraries that depend on Apple's.

It coud be simple enough to not require Apple's library if this post is to go by: https://medium.com/@kielnicholls/embedding-livephotos-on-a-web-page-5dfa9b8b83e3

Things that we probably need to do:

hutattedonmyarm commented 3 years ago

Nitpick: the video isn't stored inside the JPG. Live Photos are exported as two files: The static image (JPG or HEIC) and the video file

damianmoore commented 3 years ago

A bit more info. According to this post, depending on compatibility settings the result of a live photo could either of these:

I haven't been able to find the mentioned settings in my test iPhone (6S) though and downloading via iCloud seems to produce the first output (though this might be being converted on the iCloud side).

If anyone has a HEIC live photo, I'd appreciate it as I haven't been able to find a test file yet. I believe the file extension for this might be .heics ('S' denoting sequence) based on what I've read on Wikipedia.

hutattedonmyarm commented 3 years ago

I think you misread. It produces either JPG + MOV or HEIC + MOV. For older iPhones the video is H264 encoded, newer ones are HEVC videos

damianmoore commented 3 years ago

OK, thanks @hutattedonmyarm for clarifying. I must have made an assumption that Apple's live photos would map onto the "Image sequences" or "Auxiliary image items" parts of the HEIF standard.

On a related note readers here might be interested to know that HEIF/HEIC files are now supported https://github.com/photonixapp/photonix/issues/288 and will be in v0.14.0 when it finishes building.

GlassedSilver commented 3 years ago

I would also like to see such functionality, additionally it would be awesome to have this capability for Motion Photos by Samsung, Google and other providers. (like Huawei)

I would also like to reference this issue for DigiKam, there you can find image samples and maybe it's useful in other ways as well, I don't know. Shared knowledge etc... https://bugs.kde.org/show_bug.cgi?id=385726

FPMilan commented 2 years ago

Would also love to see this <3