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

Import: Low-res image used as primary file in a stack #813

Closed
david1155 opened this issue Jan 4, 2021 · 11 comments
Closed

Import: Low-res image used as primary file in a stack #813

david1155 opened this issue Jan 4, 2021 · 11 comments
Assignees
Labels
enhancement Refactoring, improvement or maintenance task released Available in the stable release

Comments

@david1155
Copy link

Hello,

On iPhone it is possible to take "Live" photos. Unfortunately, when I import such live photos in photoprism, it is importing as movie with wrong low-resolution screenshot as main picture.

For example, this is "Live" photo imported directly from iPhone (no EXIF data because iPhone deleted it automatically):
Screenshot 2021-01-04 at 18 52 44

And this is the same photo, but imported from Mac using same picture, but as HEIC+MOV+XMP (exported from Photos app):

Screenshot 2021-01-04 at 18 53 52

Screenshot 2021-01-04 at 18 54 19

Picture is now "Live" but with wrong low-resolution main photo.

time="2021-01-04T17:48:48Z" level=info msg="moving media files from /photoprism/import to /photoprism/originals"
time="2021-01-04T17:48:48Z" level=info msg="classify: loading nasnet"
time="2021-01-04T17:48:51Z" level=info msg="classify: loading labels from labels.txt"
time="2021-01-04T17:48:51Z" level=info msg="import: no .ppignore file found"
time="2021-01-04T17:48:51Z" level=info msg="media: IMG_7098.mov was taken at 2021-01-04 17:48:22.977787757 +0000 UTC (file mod time)"
time="2021-01-04T17:48:51Z" level=info msg="import: moving main mov file upload/IMG_7098.mov to 2021/01/20210104_174822_0E0DB223.mov"
time="2021-01-04T17:48:51Z" level=info msg="import: moving related xmp file upload/IMG_7098.xmp to 2021/01/20210104_174822_0E0DB223.xmp"
time="2021-01-04T17:48:51Z" level=info msg="import: moving related heif file upload/IMG_7098.HEIC to 2021/01/20210104_174822_0E0DB223.heic"
time="2021-01-04T17:48:52Z" level=info msg="media: 13 thumbnails created for 20210104_174822_0E0DB223 [303.697123ms]"
time="2021-01-04T17:48:52Z" level=info msg="import: added main mov file 2021/01/20210104_174822_0E0DB223.mov"
time="2021-01-04T17:48:52Z" level=info msg="import: added related xmp file 2021/01/20210104_174822_0E0DB223.xmp"
time="2021-01-04T17:48:52Z" level=info msg="import: added related heif file 2021/01/20210104_174822_0E0DB223.heic"
time="2021-01-04T17:48:54Z" level=info msg="import: added related jpg file /photoprism/storage/sidecar/2021/01/20210104_174822_0E0DB223.mov.jpg"
time="2021-01-04T17:48:54Z" level=info msg="import: deleted empty folder upload"
time="2021-01-04T17:48:54Z" level=info msg="import completed in 6.309828303s"
time="2021-01-04T17:48:54Z" level=info msg="closed database connection"

Test photo:
HEIC
MOV
XMP

@david1155
Copy link
Author

A huge amount of Live photos are already imported. It seems that it is needed to make HEIC photo as main photo, not the MOV.jpg screenshot.

@lastzero
Copy link
Member

lastzero commented Jan 5, 2021

Depending on the import / indexing order, the "wrong" primary (preview) image may be selected for a movie or raw. Right now, it simply is the first JPEG the indexer finds.

@lastzero lastzero changed the title corrupted HEIC import Import: Low-res image used as primary file in a stack Jan 5, 2021
@lastzero lastzero self-assigned this Jan 5, 2021
@lastzero lastzero added the bug Something isn't working label Jan 5, 2021
@david1155
Copy link
Author

Thank you for reply. It seems that all heif photos (thousands) with low-res mov.jpg thumbnail. And more important, when I click on picture- I see this thumbnail, there is no way to see/download original high-res picture.

Maybe it is possible to fix it somehow by deleting all mov.jpg and reindexing? Could you please advise any method?

@lastzero
Copy link
Member

lastzero commented Jan 5, 2021

Can you send a zip with examples for testing? That's better than guessing :)

@david1155
Copy link
Author

Test photo:
HEIC
MOV
XMP

ZIP

@lastzero
Copy link
Member

lastzero commented Jan 5, 2021

Thanks! I'll take a look at this later this week, or maybe @graciousgrey can test it... I'm blocked until Thursday.

@graciousgrey
Copy link
Member

I can confirm this.
@uxusoft you can download the .heic file from the files tab within the edit dialogue.

We will fix this, the jpg should be created from the heic in such cases

@graciousgrey graciousgrey added the enhancement Refactoring, improvement or maintenance task label Jan 5, 2021
@lastzero lastzero added in-progress Somebody is working on this and removed bug Something isn't working labels Jan 5, 2021
@lastzero
Copy link
Member

lastzero commented Jan 6, 2021

New preview builds available for testing, see https://docs.photoprism.org/getting-started/updates/

TL;DR: Development previews are tagged with photoprism/photoprism:preview instead of photoprism/photoprism:latest. Update your config to use this for testing. We personally also deploy the previews on production, but that choice depends on your stability requirements.

@lastzero
Copy link
Member

lastzero commented Jan 6, 2021

Even with this fix, you MAY need to manually change the primary image to the one you want to use if there are multiple JPEGs due to multiple non-JPEG media files in a stack. Note that indexing happens concurrently, so a final decision can only be made after indexing is complete. We may later auto-select the best version in our background metadata worker.

@lastzero lastzero added please-test Ready for acceptance test and removed in-progress Somebody is working on this labels Jan 6, 2021
@david1155
Copy link
Author

david1155 commented Jan 6, 2021

@graciousgrey @lastzero Thank you very much!
I will try to test this fix. Thank you for pointing to "preview" tag. I will change it, delete whole .photoprism/sidecar folder and index.

@david1155
Copy link
Author

Now HEIC is importing correctly after export from Photos app as HEIC+MOV+XMP
Thank you very much!

@lastzero lastzero removed the please-test Ready for acceptance test label Jan 19, 2021
@lastzero lastzero added the released Available in the stable release label Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Refactoring, improvement or maintenance task released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants