Smart Transcode

Run it in Docker

The image aarondyck/smart-transcode (linux/amd64) contains Python and Jellyfin's ffmpeg build, which brings the CPU, NVIDIA, Intel and AMD encoders the tool uses.

Read this first

Whether the container can write your media depends on user and group IDs. Read User and group IDs before you start; it takes five minutes and saves an evening.

Optional: a helper that writes the files

You do not need this to run the image. The helper is a script in the Linux package (download it and unpack it only if you want it). It reads the owner of your media folder, detects the GPU, and writes compose.yaml, .env and start.sh. It starts nothing.

./docker-setup.sh --media /srv/media --gpu nvidia        # or: intel | amd | cpu  (omit --gpu to detect)
cd smart-transcode-docker
docker compose up -d

Or write the compose file yourself

First install Docker Engine and the Compose plugin. Then take the file for your hardware. In every file, change PUID / PGID to the owner of your media (why) and the two media lines to your folder. Mount media at the same path inside as outside: the paths you add in Settings are paths inside the container, and identical paths keep a database portable between a container and a Linux install.

NVIDIA

Host: the NVIDIA driver and the NVIDIA Container Toolkit. Test them first:

nvidia-smi
docker run --rm --gpus all ubuntu nvidia-smi
# docker-compose.yml : NVIDIA GPU (NVENC)
services:
  smart-transcode:
    image: aarondyck/smart-transcode:latest
    container_name: smart-transcode
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      PUID: 1000                      # owner of your media: id -u <user>
      PGID: 1000                      # group of your media: id -g <user>
      UMASK: "002"
      TZ: Europe/London
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: compute,video,utility    # "video" is what gives NVENC
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu, video, compute, utility]
    volumes:
      - ./config:/config
      - /srv/media:/srv/media

In the page choose Settings → Video → NVIDIA (NVENC). Check inside the container: docker exec smart-transcode nvidia-smi.

Intel

Host: a kernel with the GPU driver loaded; ls -l /dev/dri shows a renderD128 (or similar). Nothing else to install: the image has the Intel media drivers.

# docker-compose.yml : Intel iGPU or Arc (Quick Sync / VA-API)
services:
  smart-transcode:
    image: aarondyck/smart-transcode:latest
    container_name: smart-transcode
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      PUID: 1000
      PGID: 1000
      UMASK: "002"
      TZ: Europe/London
      SMART_TRANSCODE_VAAPI_DEVICE: /dev/dri/renderD128    # several GPUs: ls -l /dev/dri/by-path
    devices:
      - /dev/dri:/dev/dri      # the container joins the device's group by itself
    volumes:
      - ./config:/config
      - /srv/media:/srv/media

Choose Settings → Video → Intel Quick Sync (or VA-API).

AMD

Host: the open-source amdgpu driver (the default on Linux). AMD encodes through VA-API; the AMF encoder does not exist on Linux.

# docker-compose.yml : AMD Radeon (VA-API)
services:
  smart-transcode:
    image: aarondyck/smart-transcode:latest
    container_name: smart-transcode
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      PUID: 1000
      PGID: 1000
      UMASK: "002"
      TZ: Europe/London
      SMART_TRANSCODE_VAAPI_DEVICE: /dev/dri/renderD128
    devices:
      - /dev/dri:/dev/dri
    volumes:
      - ./config:/config
      - /srv/media:/srv/media

Choose Settings → Video → AMD VAAPI.

No GPU (CPU only)

# docker-compose.yml : CPU only (libx265)
services:
  smart-transcode:
    image: aarondyck/smart-transcode:latest
    container_name: smart-transcode
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      PUID: 1000
      PGID: 1000
      UMASK: "002"
      TZ: Europe/London
    volumes:
      - ./config:/config
      - /srv/media:/srv/media

Choose Settings → Video → CPU. Slower, but works everywhere.

Start it

docker compose up -d
docker logs smart-transcode        # first line shows the user it runs as

Open http://your-server:8080, then Settings → General and add your root folders using their paths inside the container (/srv/media/tv in the example).

Pin a version instead of latest with image: aarondyck/smart-transcode:1.0. Update with docker compose pull && docker compose up -d.

Authentication and the Docker network

Users and passwords: docker exec -it smart-transcode smart-transcode-auth list (also reset and disable). Locked out? Create an empty file named auth-off in the config folder. With published ports every client can look like it comes from the Docker gateway (often 172.17.0.1): never add that address as a trusted network.