[Tutorial] Immich remote video transcoding #14142
Replies: 5 comments 9 replies
-
thanks a looooooot. I will use these like right now. Because, I need to set up at least 3 workers on 3 machines. And, I am struggling like hell to do even the basic. |
Beta Was this translation helpful? Give feedback.
-
I love this but what I haven't seen is the ability to have the main server running both API and microservices AND THEN another machine running the microservices for all ML and transcoding needs. Is it possible to do something like this:
Official documentation nor unofficial that I have found mentions the specifics of having multiple containers for microservices and ML |
Beta Was this translation helpful? Give feedback.
-
if i have machine learning already set up on my pc & working, how to point to it for transcoding videos? |
Beta Was this translation helpful? Give feedback.
-
As I was struggling with the details on SMB mountings, I would like to add my results to this post in order to avoid this hassle for others. I'm using the external library function to bring my pictures into immesh (hence the two volumes): in the .env file: in the docker_compose: [...] |
Beta Was this translation helpful? Give feedback.
-
Description & Prerequisites
Decided to write this in order to help fellow users to transcode their library on remote server (e.g. gaming PC), where their immich server isn't powerful enough, or doesn't have required hardware acceleration.
In this example, immich server is the server that hosts your Immich instance on (basically
docker-compose.yml
contents). remote server is more powerful hardware, e.g. your gaming PC.Prerequisites:
${UPLOAD_LOCATION}
mountpoint/files directly. It means that users who don't store files in remote storage (e.g. via NFS) will have a hard time to set it up, but it's not a problem to me.So before you begin - understand this if you are using local storage, you might need to mount it via SMB or NFS to your remote server. If you cannot do this - this guide tutorial will not work for you.
Procedure
Perform these steps on immich server:
redis
(ports: [6379:6379]
) anddatabase
(ports: [5432:5432]
) ports in yourdocker-compose.yml
, so these 2 are accessible from the outside (so your remote server can access it)..env
and add this variable:IMMICH_WORKERS_INCLUDE: 'api'
docker-compose.yml
stack:docker compose down
anddocker compose up -d
.Now perform these steps on remote server:
docker-compose.yml
,example.env
(rename to.env
) andhwaccel.transcoding.yml
files. From docker-compose remove everything butimmich-server
and update how you mount your${UPLOAD_LOCATION}
, so it points to the same physical location as your immich server..env
and update DB password and DB name to match what's on your immich server. Additionally, add these variables:DB_HOSTNAME=<ip_of_immich_server>
andREDIS_HOSTNAME=<ip_of_immich_server>
andIMMICH_WORKERS_INCLUDE: 'microservices'
.docker compose up -d
and see if no errors:docker logs -f immich_server
(all should be green).Now go back to Immich WebUI and configure hardware transcoding settings. My remote server has RX 7900 GRE, it supports AV1 encoding & decoding and hardware acceleration is powered by
vaapi
method, so I enabled it. Now go to jobs and press to transcode all your videos. Once it starts, rundocker logs -f immich_server
on your remote server to see if any errors (e.g. if your hardware acceleration is working). If no errors in red - congratulations, everything is working. :)Depending on your use-case, you might want to revert the changes. Security & firewall aspects are out of scope for this tutorial.
Beta Was this translation helpful? Give feedback.
All reactions