Closed zhelyan closed 9 months ago
Also experiencing this issue. Tried it with the sample file above and got same results
[Nest] 995 - 10/15/2023, 1:14:24 PM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 995 - 10/15/2023, 1:14:24 PM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 995 - 10/15/2023, 1:14:24 PM ERROR [JobService] Object:
{
"id": "f24ed36d-00e1-4e52-b9c2-24cfe35d7ed2",
"source": "upload"
}
I went down the rabbit hole a bit on this. Immich uses Sharp for thumbnail rendering (alongside I'm sure much else) - command is here:
https://github.com/immich-app/immich/blob/main/server/src/infra/repositories/media.repository.ts#L28
Sharp uses libvips
under the covers, and for raws like ORF libvips
largely delegates to ImageMagick/GraphicsMagick.
Using the vips
CLI (vips.exe copy .\P9170122.ORF .\P9170122.jpg
) I got the same error trying to convert an ORF to a JPG (VipsForeignLoad: ".\P9170122.ORF" is not a known file format
). Explicitly trying to use ImageMagick using vips magickload
resulted in it not being able to find a ppm
file which I assume is because ImageMagick isn't converting ORF->PPM.
So I have two mysteries - why libvips
is saying it's not a known file format, and why ImageMagick isn't decoding ORFs. I'm hoping it might be as simple as putting a newer libmagick
binary in.
There's also libraw
in use, which is possibly how we're getting the metadata - it's possible that could also be used to make thumbnails (although it'd be simpler to have Sharp do it).
Another different idea might be to extract the embedded preview with something like this (might even save some compute power): https://www.npmjs.com/package/raw-preview
this doesn't work - vips copy input.orf output.jpg
this does work - vips magickload input.orf output.jpg
For some reason it is not using this loader. I'm not sure which loader it is using, but it is not picking this one, which does work fine. So it is less about using a newer libmagick binary and more about vips just not picking a loader that works.
You did better than I did - maybe my copy of vips/libmagick was broken. Sounds like you're right, the only mystery is why it's not falling back to magick.
I'm testing directly on the immich-microservices container
Yeah it eventually worked for me in an Alpine container (I was testing on a Debian machine and then in a Ubuntu container) - maybe I'm affected by the same bug they mentioned in their dockerfile.
Here is another file that has this issue: https://u.pcloud.link/publink/show?code=XZ969y0Z02um8sNzzwkbXzScdMpvghiXOaBy
Apparently recent Dockerfile base-image change fixed RAW image thumbnail generation https://github.com/imagegenius/docker-immich/issues/208
But as tested with the latest image version, ORF
files are still failing on thumbnail generation
Verified that this works with vips 8.15.
This is still broken for me on 1.90.2:
[Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format
[Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Error: Input file contains unsupported image format
[Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Object:
{
"id": "8a519c99-716c-418a-b37a-5cadbb8123a4"
}
This is still broken for me on 1.90.2:
[Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: Input file contains unsupported image format [Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Error: Input file contains unsupported image format [Nest] 8 - 12/14/2023, 12:31:01 AM ERROR [JobService] Object: { "id": "8a519c99-716c-418a-b37a-5cadbb8123a4" }
The fix is not included in 1.90.2
it seems.
Main branch commit https://github.com/immich-app/immich/commit/02d55644e5001940fbf3480c3f891252baf24d3d doesn't have tag associated with it. So I assume it's going to be available in the next release
The bug
Olympus ORF files are not displayed in the gallery:
The OS that Immich Server is running on
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)"
Version of Immich Server
v1.77.0
Version of Immich Mobile App
v1.77.0
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
Error logs when refreshing the thumbnail: