librephotos icon indicating copy to clipboard operation
librephotos copied to clipboard

Support for iOS Live Photos

Open meichthys opened this issue 3 years ago • 7 comments

Support for iOS Live Photos would be a welcome feature for any iOS user. I've come to love (and rely on) the live 'mini video' feature that has been added to iOS photos.

Adding this feature would make the transition from Apple Photos much more seamless.

meichthys avatar Jun 26 '21 02:06 meichthys

THIS PLEASE! Using Exiftool the photo (.heic) contains Media Group UUID : C3F5C9D7-*****

And the video (.mov) contains Live Photo Auto : 1 Content Identifier : C3F5C9D7-***** Live Photo Vitality Score : 0.939849615097046 Live Photo Vitality Scoring Version: 4

This could be used to link the two files together. A non LivePhoto doesn't contain the "Media Group UUID" attribute.

MatthewBraun avatar Feb 27 '22 03:02 MatthewBraun

Live photos would be a great feature indeed. If you need some examples, I'm happy to send some over.

spiek90 avatar Feb 27 '22 09:02 spiek90

@derneuere Do you have an idea how involved this might be? Would it be a good first-issue or something that someone unfamiliar with the code may be able to implement?

Without Live Photos support, Librephotos is very cluttered since every photo has a duplicate video.

meichthys avatar Mar 11 '22 11:03 meichthys

This contains the following two problems:

  1. The photo and video should not be duplicated and should be saved in the same photo
  • Add a function that allows for the detection of live photos and add that here: https://github.com/LibrePhotos/librephotos/blob/dev/api/directory_watcher.py
    • Handle missing photo or video of a live photo correctly. Is it in the beginning a photo/video and displayed, or do we hide incomplete live photos?
    • Do we need a new field media group in order to query the database, and what about colliding media groups? Should we assume that live photos are always in the same folder in order to fix that?
    • What about different implementations of live photos from samsung phones, for example?
    • Test rescanning and implementing cases that follow from that
    • The result should be adding the path of the video and image to the same "photo" and setting the correct type.
  1. Display live photos in the correct way
  • Change the photo model to have a "type", which can be "photo", "video" or "live photo" and remove the video attribute
    • Use the migration from django in order to do that
  • Calculate the thumbnails correctly. It has videos thumbnails for small and medium thumbnails for react-pig, but it's a picture when viewed in the lightbox.
    • Is this correct, or are live photos displayed differently?
  • Change the serializer method used for types and change it everywhere where video is used
  • Change the lightbox to handle the new type
  • Change react-pig to handle the new type. Do we need an overlay to indicate that it is a live photo?
  • Change the mobile app to handle the new type

It will take some time, but if somebody wants to implement it, it can be done :)

derneuere avatar Mar 11 '22 13:03 derneuere

Wow, thanks for the thorough reply 👍 I think it's beyond my abilities and available time at the moment, but I'll be sure to follow the sub and offer help/input where needed when we start to make progress on this.

meichthys avatar Mar 11 '22 19:03 meichthys

  • Change react-pig to handle the new type. Do we need an overlay to indicate that it is a live photo?

Absolutely need an overlay to indicate it's a live photo. Something like this in the top right corner would be nice.

live-photos-50

wjbeckett avatar Aug 22 '22 09:08 wjbeckett

Just for reference: The live icon in iOS Photos is on the top left.

meichthys avatar Aug 22 '22 11:08 meichthys