Jump to content

Any update on hardware (Nvidia) transcoding support on ARM64 platforms?


Recommended Posts

  • 2 weeks later...
Posted

Hi, have you tried it?

WayneZ
Posted (edited)

Yes, I tried the docker image lscr.io/linuxserver/emby:latest. The hardware acceleration isn't showing up in emby.

With the help of Gemini CLI, I build ffmpeg for arm64 and installed it to the docker image I was very closed to get the hardware acceleration working. However the ffdetect is a private binary that I cannot build it for arm64 myself. It seems to be the last missing piece to get the support working.

 

Edited by WayneZ
  • 2 weeks later...
Posted

@WayneZCan you try our official Docker container instead?

WayneZ
Posted

Yes, I tried the official image but still doesn't work. Here is my docker compose. Please find the logs attached as well.

services:
  emby:
    image: emby/embyserver:beta
    container_name: emby
    runtime: nvidia
    restart: unless-stopped
    environment:
      - UID=1000
      - GID=1000
      - GIDLIST=44,993
    group_add:
      - video
    volumes:
      - emby_config:/config:rw
      - emby_medias:/data/medias:rw
    devices:
      - /dev/dri:/dev/dri
    networks:
      - traefik_public
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu, video]

 

hardware_detection-63917807778.txt embyserver-63917843758.txt embyserver.txt

  • 3 weeks later...
  • 2 weeks later...
WayneZ
Posted

I believe so, this is my configuration

services:
  emby:
    image: emby/embyserver:beta
    container_name: emby
    runtime: nvidia
    restart: unless-stopped
    environment:
      - UID=1000
      - GID=1000
      - GIDLIST=44,993
    group_add:
      - video
    volumes:
      - emby_config:/config:rw
      - emby_medias:/data/medias:rw
    devices:
      - /dev/dri:/dev/dri
    networks:
      - traefik_public
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu, video]

 

  • 2 weeks later...
Posted

@WayneZdid you try the part where it says gpus: all ?

  • 3 weeks later...
Posted (edited)

From my search online, the following 

- driver: nvidia
  count: all
  capabilities: [gpu, video]

is equivalent to --gpu all. 

---

Here is the diagnose of the problem by Gemini

Issue Summary

When running the official ARM64 (aarch64) Docker container (emby/embyserver) on an ARM host with an NVIDIA GPU passed via NVIDIA Container Toolkit, hardware acceleration fails to expose NVENC or CUDA capability.
 
Checking the bundled ffmpeg binary inside the container reveals that the aarch64 build explicitly disables CUDA and omits NVENC/CUDA capabilities during compilation.

Diagnostic Logs

Container Architecture: aarch64
 
Running ffmpeg -version inside the emby/embyserver container shows:
ffmpeg version 5.1-emby_2023_06_25_p6 Copyright (c) 2000-2022 the FFmpeg developers and softworkz for Emby LLC
built with gcc 13.4.0 (crosstool-NG 1.28.0)
configuration: --cc='sccache aarch64-emby-linux-gnu-gcc' --prefix=/home/embybuilder/Buildbot/armv8/ffmpeg-armv8/package ... --disable-cuda-llvm ...
Checking for NVENC encoders yields no results:
/ # /bin/ffmpeg -encoders | grep -E "libnvidia|nvenc"
(empty output)

Root Cause

  1. Compilation Flags for ARM64 (ffmpeg-armv8😞 The toolchain configuration for aarch64 uses --disable-cuda-llvm and omits --enable-cuda, --enable-nvenc, and --enable-ffnvcodec.
  2. Architecture Parity: While the x86_64 / amd64 builds of emby-ffmpeg include full NVENC/CUDA support out of the box, the aarch64 target build appears to assume mobile/SBC targets (e.g., Raspberry Pi) rather than ARM64 servers equipped with NVIDIA GPUs.

Proposed Solution for the Emby Team

To provide feature parity for ARM64 server environments equipped with NVIDIA hardware, please consider updating the build pipeline for ffmpeg-armv8 / aarch64:
 
  1. Update ffmpeg-armv8 Build Flags:
    Enable CUDA and NVENC headers in the ARM64 build matrix by adding:
    --enable-cuda \
    --enable-nvenc \
    --enable-ffnvcodec \
    --enable-cuvid
    (And removing --disable-cuda-llvm where appropriate).
  2. Include NVIDIA Runtime Libraries in the ARM64 Container Image:
    Ensure libnvidia-encode / nv-codec-headers or dynamic CUDA loader headers are bundled in the base ARM64 container image to support NVIDIA Container Toolkit runtime injection.
 
Please ensure that ffdetect and ffprobe are also rebuilt with the same CUDA/NVENC/FFNVCODEC flags in the aarch64 pipeline. Since Emby's NvidiaCodecProvider calls /bin/ffdetect nvencdec at startup to discover GPU features, updating ffmpeg alone without updating ffdetect will prevent Emby from listing NVENC encoders in the Dashboard UI.
Edited by WayneZ

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...