-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Imaginary preview generation is not working as expected for folders containing HEIC images. #35643
Comments
I fear this is nothing I can fix here. It is rather something that needs to be fixed in server. |
Facing the same issue. Are we sure, that this has to be fixed in the server, rather that in Imaginary itself? |
The errors that appear in the log are:
Just posting it so people can find this issue when searing for |
Issue still exist. Default preview-generator is faster than imaginary on HEIC files. Any plans to fix this? |
I have upgraded to Nextcloud 25.0.4 and HEIC images still can't have their previews generated. Receiving error |
Hey, I have made small investigation.
|
Hi, thanks for your investigation! Will adjust this in AIO for the next release. |
Would love to hear and test when this is available in beta channel. |
This is now released with v4.6.0 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel |
Just tested with one or two dozens of heic images. Kind of better, but not good yet. Previews of HEIC are not created and anytime I access that folder with photos oder files app imaginary has high CPU and memory for about 10 or 15 minutes and other services on that server are affected. |
I suppose this might happen beccause it is creating too many previews at once which will be improved with Nc26 by limiting the amount of previews that get generated in parallel based on the amount of cpu cores |
BTW, I just added some instructions to nextcloud/all-in-one#1846 how you can try out nc26 already if you feel brave. |
I think I will try out and revert back from backup to wait until you release aio with nc26. |
Now that I am thinking about it, the limit will likely not work yet because the container is currently missing a php extension that is required for it to work. You'll see a warning for that in the admin overview after the update if that should be the case. However you could use https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container to add the extension temporarily until it gets added officially with the official update to nc26. Additionally, please make sure that |
Thanks for your instructions. Unfortunately no change with preview generation. Off-topic:
|
Did you check this?
Is something in the imaginary or nextcloud logs maybe?
|
I could finally reproduce the problem with this sample image: https://github.com/dsoprea/heic-exif-samples/blob/master/image1.heic It seems like the problem is that generating a preview takes forever: |
However this is likely an imaginary issue so not sure how to fix this here... |
Okay, it looks like i found something. It looks like autorotate is broken for heic. |
I confirm that messages in imaginary logs. |
Dont worry. Since this is a bugfix it will be backported after the merge in master. |
Hi, can you please check if this patch makes things work for you? (works in my testing at least) |
h2non/imaginary#187 does said Imaginary supports HEIC already? |
Yeah but autorotate seems tobe broken for heic which will be fixed with the patch by disabling it for heic. |
How to apply this? |
|
Thanks. Didn't know that git is available inside your container. Will check that today in the evening. |
|
Can you try without the --check? this should then actually apply it. you check if it applied if a second apply fails with a different error... |
Same error as before even without |
Wow, that is really long. In my case it was about 6 sec before and 3 sec after updating libheif. It also dropped CPU usage from 100% to about 40%. Imagemagick could do that less than a second with 100% load. |
It should have still applied the patch at least this was the case in my testing. |
Did you test with the same file? In my testing the only way to make it work was to skip the autorotation for heic which was done in the mentioned PR and patch. |
Can't get that patch working.
|
Yeap, I have checked on same small HEIC database (~1000 files) got from IPhone without any conversion. I guess in my case all files were rotated correctly. Disabling crop/rotate and other functions didn't speed up the whole set. Is that possible to add some kind of checkbox to enable/disable HEIC support in imaginary? I guess for single/dual core usage it would be better to use Imaginary for everything except HEIC and regular previews for HEIC (single threaded but fast). |
So you're saying Imaginary on my (dual-core) system is slower as default preview generation would be? |
Manually patch my server both test and production environments, got the similar result, not much faster, but it works. |
Are the patches applied to the nextcloud/aio-imaginary container? Or do we still have to apply the patches manually? The latest documentation states imaginary has issues with HEIC and links to this issue, which is closed. Maybe there are other issues that should instead be linked to? |
@MrRinkana The patching was only a discussion relevant before the linked PR was merged. It's been merged for well over a year now. |
How to use GitHub
Steps to reproduce
Expected behavior
Images with accompanying previews should appear.
Actual behavior
The imaginary binary from the imaginary docker container commits all available memory and swap space, finally getting killed a few minutes in after running out of memory.
Preview generations succeed very slowly but it seems that already generated previews do not get used successfully, at least I could never get them to show up.
It is notable that the previews for other files in the folder (.mp4 videos, 4 .jpg images) work and appear.
Host OS
Ubuntu 20.04.5 LTS (VPS with 4vCPUs, 8GB of RAM and 2GB configured swap)
Nextcloud AIO version
Nextcloud AIO v3.1.0, Nextcloud 24.0.7
Current channel
latest
Other valuable info
Relevant link with a bug report of another user: https://help.nextcloud.com/t/imaginary-not-working-on-nextcloud-aio/146725
Logfile of the imaginary container: aio_imaginary_log.txt
Screenshots of htop on the VPS
The text was updated successfully, but these errors were encountered: