[Feature] Outsource video transcoding #7925
Replies: 5 comments 13 replies
-
You can run multiple instances of the microservices container and put those wherever you like, such as on your pc. Right now any instance will pick up any jobs, but in the future we hope to add an option to filter which jobs will be accepted through an env var. |
Beta Was this translation helpful? Give feedback.
-
This is good to know. Where do I then setup concurrency? There is a Setting for e.g. thumbnail-generation or transcoding. Let's say I deploy 3 microservices across 3 machines. Do they each pick up the respective number of tasks (per default 5 for thumbnails and 1 for transcoding) or do I need to increase the concurrency-setting myself? |
Beta Was this translation helpful? Give feedback.
-
How can i specify the host to check? For machine learing i can change I've already mounted all my library files necessary and database is also reachable. On my other host container is already running, i just can't make my main host to use it. Update 1 I found an semi elegant way to modify the hosts file using docker compose file only
but it seems there is a harder binding between immich-server (?) scheduling immich-microservices. Update 2 Really strange behavior. Even without using any tricks like In docker compose i even tried clean adding nginx as loadbalancer mimic the container name
but still same behavior that either a) nothing works or b) the whatever-named-original-microservices container is uses whichever strange name i give it. |
Beta Was this translation helpful? Give feedback.
-
I have the microservices container offloaded to a different host: My heavy lifter (MacBook): #
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#
name: immich
services:
immich-microservices:
container_name: immich_microservices
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
command: ['start.sh', 'microservices']
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
restart: always
immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
ports:
- 3003:3003
volumes:
model-cache: on the heavy lifter: # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are stored
UPLOAD_LOCATION=/Volumes/mount
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release
# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=**********
DB_HOSTNAME=LOW_POWER_CLIENT_IP # replace with theLAN ip of the machine hosting your Postgres/redis, same below
REDIS_HOSTNAME=LOW_POWER_CLIENT_IP
TZ=***********
# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=********
DB_DATABASE_NAME=******** Notice the exposed ports on my lower-powered host machine #
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#
name: immich
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
command: ['start.sh', 'immich']
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- 2283:3001
depends_on:
- redis
- database
restart: always
deploy:
resources:
limits:
# Number of CPU threads
cpus: '3.00'
# Gigabytes of memory
memory: '1.5gb'
redis:
container_name: immich_redis
image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
restart: always
ports:
- 6379:6379
database:
container_name: immich_postgres
image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
ports:
- 5432:5432
volumes:
model-cache: The NFS share settings I'm using to share to my MacBook over LAN: /home/cakedayy/docker_apps/immich/mount <my_client_ip>(rw,sync,no_root_squash,no_subtree_check,insecure) |
Beta Was this translation helpful? Give feedback.
-
For those coming via Google, I wrote guide here: #14142 |
Beta Was this translation helpful? Give feedback.
-
The feature
It would be nice to have an option to "outsource" video transcoding.
My immich instance is on a small Intel NUC and transcoding my 4k footage is super slow. So what would be nice is if I could use by beefy gaming PC to transcode the videos. So after some vacation I can turn an extra "server" on my pc to transcode for some hours and shut it down again, and the main server would not do any encoding at all if the server is not available.
Platform
Beta Was this translation helpful? Give feedback.
All reactions