-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
HEIF: heif-convert must be updated to prevent empty JPEGs #2726
Comments
I've searched the error message on Google and found this issue (it's the tool we use unless you run PhotoPrism directly on a Mac, which would use Sips instead): |
Looked up this issue by myself for hours and didn't saw that issue, thanks! |
PNG files would be huge. In a perfect world, someone would help us compile |
Did you upload HEIC with iPhone? same issue. Replicate: |
I wonder if this is a setting in iPhones safari, that it does the JPG conversion during upload. |
heif-convert
must be updated to prevent empty JPEGs from being created
heif-convert
must be updated to prevent empty JPEGs from being created
It isn't. I don't use iOS. All of my pictures were taken with a Xiaomi Mi 10 Ultra. |
Anyone got an affected sample image around? Tried with a random HEIF image from google and it worked with the stock heif-convert on Debian. Also, there is some confusion about what |
@srett Thanks a lot for looking into this! I didn't know about |
@lastzero Just dropped you a mail |
Signed-off-by: Michael Mayer <michael@photoprism.app>
@srett Got it! Unfortunately there was no HEIF example attached to the email, so I can't share anything but the information I already shared (use libjpeg8). I guess it's best to try libjpeg8, because a bad color profile is still better than no JPEG at all.... my build script is a mess and I don't have time to build for all the other Docker images. You are welcome to take care of it later if you want! :) |
Signed-off-by: Michael Mayer <michael@photoprism.app>
The naming scheme for the downloadable binary archives could also use some love... |
Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
Seems like the convert script isn't needed anymore with the new version of |
Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
Ah right, I only tested on Debian Bookworm, and it doesn't even ship
If the But maybe @MoweME can provide an affected |
ICC profiles are there, I just checked. It would be awesome if we could get more HEIF/HEIC examples for testing, especially if we can make them available on https://dl.photoprism.app/samples/! |
Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
Not at this time, because it adds complexity and will likely slow down indexing significantly as well. We can go that extra mile when there are fewer open issues and we have a support team that can help with any problems that might result. |
To give a specific example: I'm not sure to what extent PNG supports the metadata of the regular JPEG file and possibly something might get lost when converting. It is possible to test and figure this out, but we don't have the time. |
@larsxschneider As a workaround, you can simply change the name and/or path of the "heif-convert" binary in the config options so that you can continue to use your existing script. |
I will do that. Thank you for your explanations and the clear communication 🙇 |
@lastzero I think this is the right place to put this. I was indexing some new photos on the latest preview release
I downgraded to the stable release
Do you need me to send you one of these photos to figure out what's going on? |
Yes, samples would be great! See the contact page on our website for details. Thanks ❤️ |
Sample sent. Upon closer inspection, I see that, in fact, none of my HEIC images were converted on the preview build. All the photos I do see were uploaded with a corresponding jpg because they were either edited or shot in a special mode that created a jpg on the phone. So, to clarify, that preview build mentioned above is not converting any of my HEIC images. That seems super weird to me based on the discussion above, so I want to make sure it's not a configuration issue on my end. Are there any new settings that need to be changed when switching from the current stable to the preview build for this to work properly? |
@inthreedee I just indexed the sample file on the preview build and PhotoPrism created a sidecar JPG as expected. What settings do you use? Did you disable one of the converters? |
@inthreedee Is it possible that you use a special Docker image version, e.g. for ARM64, ARMv7 or based on Debian? We have tested our custom heif-convert binary mainly on AMD64 and it is only available for Ubuntu 22.04 LTS so far. |
@lastzero Yes, this is on a Raspberry Pi 4 running Ubuntu Server 22.04.1LTS. Let me know what I can do to help. I haven't disabled any of the converters and sidecar creation seems to work fine when I downgrade to the stable version of PhotoPrism without changing any other settings. If there's a specific setting I need to look at, please let me know |
Good catch! Might be a library missing or it didn't compile properly. Should have tested the ARM version with an actual HEIC file too... You could turn on trace mode to see the error message in the Docker logs, if any. For security reasons, info logs and higher don't include server internals anymore. |
Can you verify if you are using the 32-bit ARMv7 version for some reason? It can happen on Raspberry Pi OS as it is a 32-bit operating system. |
So the binary is there, but it fails due to a missing symbol in a shared library. Trying to find a solution! |
Signed-off-by: Michael Mayer <michael@photoprism.app>
I'm using 64bit Ubuntu Server for the OS with the |
Signed-off-by: Michael Mayer <michael@photoprism.app>
A difference is the newer Darktable version in the AMD64 image. Darktable has libheif 1.12 as a dependency, which probably causes our custom heif-convert 1.13 binary to be linked against this old version. It seems that I can fix the problem by setting an explicit LD_LIBRARY_PATH when calling heif-convert with Go. Easy!? |
If that's the case, let me know when another preview build is ready and I'll test it on my end for you. |
@inthreedee Build |
Done! Happy testing 😉 |
Seems to have done the trick, thanks! |
Thank you @lastzero for your awesome work. This issue seems to be resolved! |
Sorry for taking so long to report back. Real life got in the way of testing for a bit there. Thanks again! |
Thanks for testing! 🎂 |
It would be awesome if someone could help us compile
heif-convert
withlibjpeg80
as mentioned in this issue comment. If that fixes the problem, we don't have to spend time on a workaround! 💎💖A bash script that we can drop into https://github.com/photoprism/photoprism/tree/develop/scripts/dist will do. It can then be run when building Docker images, but also by people who don't use Docker.
1. What is not working as documented?
Uploaded HEIC pictures can't be converted into JPEG.
2. How can we reproduce it?
Steps to reproduce the behavior:
Album is empty. Using current docker preview build.
3. What behavior do you expect?
PhotoPrism should create a JPEG version in addition to the original HEIC file.
4. What could be the cause of your problem?
Looks like the HEIC converter doesn't generate any output.
5. Can you provide us with example files for testing, error logs, or screenshots?
6. Which software versions do you use?
(a) Build 220919-cc8bab446 / AMD64
(b) Database Type & Version: mariadb:10.6
(c) Operating System Types & Versions: Docker (photoprism/photoprism:preview)
(d) Browser Types & Versions: Any browser tested. (Mainly tested Brave for Windows v1.43.93)
(e) Ad Blockers, Browser Plugins, and/or Firewall Software?: Everything disabled.
7. On what kind of device is PhotoPrism installed?
This is especially important if you are reporting a performance, import, or indexing issue. You can skip this if you're reporting a problem you found in our public demo, or if it's a completely unrelated issue, such as incorrect page layout.
(a) Device / Processor Type: 8 x Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz (1 Socket)
(b) Physical Memory & Swap Space in GB:

(c) Storage Type: Containers installed on SSDs, NAS Storage mounted (original pictures)
(d) Anything else that might be helpful to know?: All types of images work except HEIC
The text was updated successfully, but these errors were encountered: