-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat(server): transcoding hardware acceleration #3171
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
7e93fcd
to
390a340
Compare
134fa68
to
70b3d9c
Compare
Does |
The image has to support image formats like RAW since it's responsible for thumbnail generation. |
Does it work ? With this image we have to build imagemagick & libvips to support raw images. |
And you can possibly have a version mismatch between libvips & sharp. Currently immich uses sharp v31.3 which requires libvips v8.13.3 and bookworm provides libvips v8.14.1-3, so it's not an issue for now |
It seems Imagemagick can handle raw images, but sharp throws an error. I can try compiling libvips as well to see if that helps. |
70b3d9c
to
55bc566
Compare
I can confirm RAW images work now after compiling libvips. The image is also a decent bit smaller at 1.07gb instead of 1.22gb. |
I tried this with Quick Sync, and well, libva errors on 6th gen Intel :(
|
From that log it's using Alpine binaries. For the dev environment, I think you need to set both immich-server and immich-microservices to use Dockerfile.accel and rebuild the containers. (That should probably be the default for dev, though the bigger conversation to have is whether this image should replace the existing Alpine one or be an alternate version.) Also double check that you have the hwaccel.yml and enabled the renderD128 device on it. Edit: It actually does seem to be the default, so I guess it's something else after all. |
I'm using the ghcr.io/immich-app/immich-server:pr-3171 image tag though? Can be seen here |
Does the PR build push hardware accelerated enabled images? |
The option exists in settings, but it seems to be alpine based images only. |
It seems GH was building with the Alpine-based Dockerfile before this. I moved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested this PR, but LGTM!
a421314
to
332707a
Compare
styling
96cb534
to
254b7d6
Compare
Description
Support for NVENC, Quick Sync and VAAPI transcoding backends. This will make transcoding much faster at the cost of lower quality at the same bitrate compared to software encoding.
Additionally, this substantially changes the server/microservices Dockerfile:
Fixes #1225, fixes #3084
Notes:
hwaccel.yml
thatimmich-microservices
uses to set the appropriate settings for the docker container. Be sure to uncomment the right sections in this file to ensure hardware acceleration works.immich-microservices
andimmich-server
containers and thedist
andnode_modules
folders relating to them. Otherwise you might see errors stemming from it trying to load Alpine binaries.How Has This Been Tested?
Current testing in production build on three systems, one with an Nvidia GPU, another with an older Intel CPU, and a third with a 13th gen Intel CPU:
NOTE: Only a limited variety of image formats were tested with this, primarily HEIC and JPEG. It would be good to check other formats as well to ensure Imagemagick and libvips work as expected.