simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.18k stars 35 forks source link

Motion photo is shown on Android as motion photo AND a video #280

Open andrej-zirko opened 1 month ago

andrej-zirko commented 1 month ago

I imported motion photos from Google Takeout via immich-go. The motion photos are displayed properly on the web version of Immich. However, on the Android app, each motion photo is shown as both a motion photo and a video without a thumbnail. The video displays an exclamation point instead of a thumbnail, and its playback is stuttering.

Command used for import ./immich-go -server http://xxx:2283 -key XXX upload -create-albums -google-photos takeout-20240529T131543Z-001.zip

Attached sample takeout takeout-20240529T131543Z-001.zip

Originally, I opened the issue on https://github.com/immich-app/immich/issues/9790.

immich-go 0.16.0, commit 7579f2577f5f24c1e6d3b266989112777332e868, built at 2024-06-02T09:25:25Z

simulot commented 1 month ago

The common file names for a live photo on Android are PHOTO.JPG and PHOTO.MP The .MP are just discarded.

Your smartphone names the video with the extension .MP4.
I need to find an accurate way to detect this case and upload only the photo

andrej-zirko commented 2 weeks ago

takeout-20240611T122312Z-001.zip

I added one regular video (not a motion photo). The video accompanying the motion photo shares the same filename as the jpg, but it doesn't have a metadata JSON file. Conversely, the regular video does have a metadata JSON file. There doesn't appear to be any other information in the takeout to differentiate between the motion video and the regular video.

simulot commented 2 weeks ago

Thanks That confirms my thoughts. I need to refactor the code

m1ndy commented 5 days ago

Samsung, Apple and Google (Pixel) are the three motion/live photo+video formats we need to support correctly for a smooth Photos import experience.

Especially since Live and Motion photos are now the default ON on Galaxy, Z, Pixel and iPhone series of phones in recent years.

simulot commented 5 days ago

Be patient That will come. The refactoring has introduced some nasty bugs that I'm try to fix on my free time.

I have tested the LivePhoto feature on:

Feel free to share some samples not yet covered