Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live photos files are stacked and not recognized as live photos #67

Closed
jdohnstad opened this issue Nov 15, 2023 · 7 comments
Closed

Live photos files are stacked and not recognized as live photos #67

jdohnstad opened this issue Nov 15, 2023 · 7 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@jdohnstad
Copy link

I believe that this is an immich-go issue and not Immich itself - I apologize if that is incorrect.

I imported a Google Takeout using immich-go (0.8.2) via:

immich-go.exe -server <my hostname> -key <my key> upload -create-albums -google-photos '.\Google Takeout\takeout-*.zip'

and noticed that a fairly significant number of thumbnails were broken. This persisted after rerunning the Immich thumbnail generation job. I pulled up the Immich microservice logs, and found a bunch of errors similar to:

[Nest] 7  - 11/14/2023, 2:21:15 AM   ERROR [JobService] Error: Input file has corrupt header: magickload: Magick: ImproperImageHeader upload/library/admin/2023/2023-10-31/IMG_5580+1.HEIC' @ error/tga.c/ReadTGAImage/239 (null)

[Nest] 7  - 11/14/2023, 2:21:15 AM   ERROR [JobService] Object:

{

  "id": "27d07cd1-78ab-463f-bcfd-1bebd40e2c26"

}

I traced this file back to the Google Takeout archive which contained the following files:

IMG_5580.HEIC
IMG_5580.HEIC.json
IMG_5580.MP4

and within my Immich library after the import I can see:

IMG_5580.HEIC
IMG_5580+1.HEIC

So it would seem that the .MP4 file got imported incorrectly as an HEIC file, and now thumbnail generation fails because its an unexpected file type. I did a comparison of the actual byte-content of the files, and the actual content is correct.

@twau
Copy link

twau commented Nov 15, 2023

This sounds like the issue I’m also experiencing on my new test Immich install, asked if anyone else had encountered the issue here #66, seems like there is a problem.

@simulot
Copy link
Owner

simulot commented Nov 15, 2023

Thanks for your investigation.

It might be the case. I don't have an iPhone, so I haven't handled this case.

Could you share the Json file content(I need this one), and if possible a sample of heic file or a random sample of this kind of file?

@jdohnstad
Copy link
Author

While tracking down a file I was comfortable sharing, I found a similar situation with a .JPG, and an .MOV that was uploaded as an mp4. I agree with @twau - it seems like generally its "Live Photos" where there is both an image and a short video clip alongside it. In my previous example with the .HEIC, I only see one sidecar json file. In this sample I've attached there is a json sidecar for both the jpeg and the .MOV

sample.zip

@jdohnstad
Copy link
Author

Also the json for the original reported HEIC:

IMG_5580.HEIC.json

@simulot simulot added the bug Something isn't working label Nov 16, 2023
@simulot simulot changed the title Google Takeout MP4s imported as HEIC Live photos files are stacked and not recognized as live photos Nov 19, 2023
@simulot simulot added the enhancement New feature or request label Nov 19, 2023
simulot added a commit that referenced this issue Nov 19, 2023
@simulot
Copy link
Owner

simulot commented Nov 19, 2023

Thank you all for your files.

@twau
Copy link

twau commented Nov 20, 2023

Uploaded my google takeout to a new immich install again to check if this fix works, and most of my LivePhotos is now displayed correct. But there is still issues with LivePhotos, will try to find more examples to upload later tonight.

For example, a few of my LivePhotos were found in the trash after the upload, the .qt movie from the LivePhotos was saved with the broken thumbnail, and the .heic file was placed in the trash

@simulot simulot reopened this Nov 20, 2023
@simulot
Copy link
Owner

simulot commented Nov 20, 2023

Thank for this comment.
So the live photo could be a couple of a photo (.JPG or .HEIC) with a video (.QC or MP4 or .MOV)...
I need to rework on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants