Using GPU on windows 11 with Immich for Encoding and Decoding. #21986
Scopes1940
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Attached is my process using chat gpt as a recap to fix any issues etc been having a hard time as a person who does not use linux or any type of code but i love the idea of Immich!
PS: you may need to install Ubuntu 22.04.5 LTS or later
Immich FFmpeg.docx
In case you acnnot access the word document:
✅ Immich FFmpeg & GPU Acceleration Setup Recap
Check your Docker containers to make sure Immich services are up:
docker ps
You should see:
• immich_server
• immich_postgres
• immich_machine_learning
• immich_redis
• Immich uses FFmpeg to generate thumbnails and transcode videos.
• Inside the server container, check FFmpeg is installed:
docker exec -it immich_server /usr/bin/ffmpeg -version
• The container path /usr/bin/ffmpeg works.
• Do not try to symlink to /usr/local/bin/ffmpeg, the directory is read-only in the container.
• In your .env file, set:
FFMPEG_PATH=/usr/bin/ffmpeg
• Make sure the container picks this up:
docker exec -it immich_server printenv | findstr FFMPEG_PATH
• This avoids EACCES errors from trying to spawn the wrong path.
• Only mount the real FFmpeg binary if needed, otherwise let the container use its internal one:
volumes:
• Avoid mounting to /usr/local/bin/ffmpeg unless you really need a custom version.
• Uploaded media folder should have full read/write permissions for the container. On Windows:
icacls D:\Immich /grant "Everyone:(OI)(CI)F"
• This avoids errors like:
Key ("ownerId", checksum) already exists
• Don’t try to “make folders read/write inside the container” — fix permissions on the host.
• Immich supports NVENC (NVIDIA) for hardware encoding.
• For end-to-end acceleration (decode + encode), enable:
Hardware decoding
in the web interface settings → transcoding.
• Your GPU graph will spike when decoding videos — this is expected. CPU usage should drop accordingly.
• In .env / docker-compose, make sure:
o Container uses runtime: nvidia
o Docker has access to the GPU
• Don’t try to chmod +x /usr/local/bin/ffmpeg — container filesystem is read-only.
• Don’t mount FFmpeg over /usr/local/bin/ffmpeg unnecessarily.
• Don’t change database container folders to network shares — Immich database must be local.
• Don’t delete or reset .env mid-run — it can break connections and container environment.
Transcoding video ... with NVENC-accelerated encoding
o Spikes indicate hardware decoding is active.
This setup ensures:
• Immich uses its internal FFmpeg binary safely.
• GPU acceleration works for encoding and decoding (if enabled in settings).
• Uploaded media is fully accessible.
• No more permission errors.
I can also make a shorter “copy-paste checklist” version if you want to share with someone quickly.
Do you want me to do that?
You said:
yes include that too
ChatGPT said:
Perfect! Here’s a concise copy-paste checklist version you can share:
📝 Immich FFmpeg + GPU Acceleration Checklist
docker ps
Check for:
• immich_server
• immich_postgres
• immich_machine_learning
• immich_redis
docker exec -it immich_server /usr/bin/ffmpeg -version
• Internal FFmpeg works.
• Do not symlink or chmod /usr/local/bin/ffmpeg (read-only).
FFMPEG_PATH=/usr/bin/ffmpeg
UPLOAD_LOCATION=D:\Immich
DB_DATA_LOCATION=./postgres
IMMICH_VERSION=release
DB_PASSWORD=Your own password
volumes:
• Avoid mounting over /usr/local/bin/ffmpeg.
• Make uploads folder fully readable/writable:
icacls D:\Immich /grant "Everyone:(OI)(CI)F"
• In web UI: Settings → Transcoding → Hardware decoding.
• Ensure Docker uses NVIDIA runtime:
runtime: nvidia
• Check GPU graph for spikes during video transcoding.
• Don’t chmod/mount /usr/local/bin/ffmpeg.
• Don’t use network shares for database.
• Don’t reset .env mid-run.
• Upload video → check logs for:
Transcoding video ... with NVENC-accelerated encoding
• No EACCES errors.
• CPU usage drops, GPU spikes.
This ensures Immich works safely with GPU acceleration and avoids FFmpeg permission errors.
PS: if you plan to use an AI to help with this process as i did give it a compy paste version fo your .yml and .env files
TAKE EACH STEP ONE AT A TIME IF YOU ARE A BEGINNER
Fianlly for the Decode to work ensure you fix the hwaccel.yml first then enable it in the settings in Immich UI as thats what worked for me.
Beta Was this translation helpful? Give feedback.
All reactions