Skip to main content

NVIDIA NVENC

Alchemist uses NVENC when NVIDIA is available and selected. Set Settings → Hardware → Preferred Vendor to nvidia if you want to pin it instead of using auto detection.

Supported generations

GenerationExample cardsH.264HEVCAV1Notes
PascalGTX 10-seriesYesYesNo2 concurrent encode streams on consumer cards
TuringGTX 16 / RTX 20YesYesNoBetter quality than Pascal
AmpereRTX 30YesYesYesFirst NVENC generation with AV1
Ada LovelaceRTX 40YesYesYesDual AV1 encoders on supported SKUs

Docker

Install nvidia-container-toolkit on the host first.

distribution=$(. /etc/os-release; echo $ID$VERSION_ID)
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L "https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list" | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt update
sudo apt install -y nvidia-container-toolkit
sudo systemctl restart docker

Docker Compose

services:
alchemist:
image: ghcr.io/bybrooklyn/alchemist:latest
ports:
- "3000:3000"
volumes:
- ~/.config/alchemist:/app/config
- ~/.config/alchemist:/app/data
- /path/to/media:/media
environment:
- ALCHEMIST_CONFIG_PATH=/app/config/config.toml
- ALCHEMIST_DB_PATH=/app/data/alchemist.db
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
restart: unless-stopped

docker run

docker run -d \
--name alchemist \
--gpus all \
-p 3000:3000 \
-v ~/.config/alchemist:/app/config \
-v ~/.config/alchemist:/app/data \
-v /path/to/media:/media \
-e ALCHEMIST_CONFIG_PATH=/app/config/config.toml \
-e ALCHEMIST_DB_PATH=/app/data/alchemist.db \
--restart unless-stopped \
ghcr.io/bybrooklyn/alchemist:latest

Binary installs

Verify the driver first:

nvidia-smi

Then verify FFmpeg exposes NVENC:

ffmpeg -encoders | grep nvenc

Expected encoders:

  • h264_nvenc
  • hevc_nvenc
  • av1_nvenc on RTX 30/40 class hardware

In Alchemist

Set Settings → Hardware → Preferred Vendor → nvidia. Leave Device Path empty. NVENC is detected from the driver and /dev/nvidiactl.

Troubleshooting

ProblemCauseFix
No encoder foundFFmpeg lacks NVENC or the driver is missingRun `ffmpeg -encoders
Container cannot see GPUNVIDIA runtime/toolkit not installed or --gpus all missingReinstall nvidia-container-toolkit, restart Docker, and test with docker run --rm --gpus all nvidia/cuda:12.0.0-base-ubuntu22.04 nvidia-smi
Driver version mismatchHost driver and container runtime stack disagreeUpdate the NVIDIA driver and toolkit together, then restart Docker