linuxserver / docker-jellyfin

GNU General Public License v3.0
650 stars 98 forks source link

[BUG] Missing RKMPP Support / Differs from default jellyfin docker image #273

Open Hempflingclub opened 1 day ago

Hempflingclub commented 1 day ago

Is there an existing issue for this?

Current Behavior

/usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device rkmpp=rk -init_hw_device opencl=ocl@rk

ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=arm64 --cross-prefix=/usr/bin/aarch64-linux-gnu- --toolchain=hardened --enable-cross-compile --enable-rkmpp --enable-rkrga
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'rkmpp=rk'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl=ocl@rk'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument rkmpp=rk.
Applying option init_hw_device (initialise hardware device) with argument opencl=ocl@rk.
[AVHWDeviceContext @ 0xaaaaf0f27240] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl=ocl@rk' for option 'init_hw_device': No such device
Error parsing global options: No such device

Expected Behavior

/usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device rkmpp=rk -init_hw_device opencl=ocl@rk

arm_release_ver: g13p0-01eac0, rk_so_ver: 10
[AVHWDeviceContext @ 0xaaaae8321360] 1 OpenCL platforms found.
[AVHWDeviceContext @ 0xaaaae8321360] 1 OpenCL devices found on platform "ARM Platform".
[AVHWDeviceContext @ 0xaaaae8321360] 0.0: ARM Platform / Mali-G610 r0p0
[AVHWDeviceContext @ 0xaaaae8321360] cl_arm_import_memory found as platform extension.
[AVHWDeviceContext @ 0xaaaae8321360] cl_khr_image2d_from_buffer found as platform extension.
[AVHWDeviceContext @ 0xaaaae8321360] DRM to OpenCL mapping on ARM function found (clImportMemoryARM).

Steps To Reproduce

image: lscr.io/linuxserver/jellyfin:10.9.11
devices:
      - /dev/dri
      - /dev/dma_heap
      - /dev/mali0
      - /dev/rga
      - /dev/mpp_service
privileged: true

/usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device rkmpp=rk -init_hw_device opencl=ocl@rk

Environment

Distributor ID: Debian
Description:    Armbian 24.5.1 bookworm
Release:    12
Codename:   bookworm

CPU architecture

arm64

Docker creation

### CPU architecture

arm64

### Docker creation

services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:10.9.11
    container_name: jellyfin
    mem_limit: 4096M
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - UMASK_SET=022 #optional
    volumes:
      - /cache/container/jellyfin:/config
      - /share/data:/data/
    ports:
      - 8096:8096
      - 8920:8920 #optional
    devices:
      - /dev/dri:/dev/dri
      - /dev/dma_heap:/dev/dma_heap
      - /dev/mali0:/dev/mali0
      - /dev/rga:/dev/rga
      - /dev/mpp_service:/dev/mpp_service
    privileged: true
    restart: unless-stopped

Container logs

[migrations] started
 [migrations] no migrations found
 ───────────────────────────────────────

       ██╗     ███████╗██╗ ██████╗
       ██║     ██╔════╝██║██╔═══██╗
       ██║     ███████╗██║██║   ██║
       ██║     ╚════██║██║██║   ██║
       ███████╗███████║██║╚██████╔╝
       ╚══════╝╚══════╝╚═╝ ╚═════╝

    Brought to you by linuxserver.io
 ───────────────────────────────────────

 To support the app dev(s) visit:
 Jellyfin: https://opencollective.com/jellyfin

 To support LSIO projects visit:
 https://www.linuxserver.io/donate/

 ───────────────────────────────────────
 GID/UID
 ───────────────────────────────────────

 User UID:    xxx
 User GID:    xxx
 ───────────────────────────────────────
 Linuxserver.io version: 10.9.11ubu2404-ls37
 Build-date: 2024-10-15T13:55:23+00:00
 ───────────────────────────────────────

 **** creating video group videobgln with id 110 ****
 **** adding /dev/dri/renderD129 to video group videobgln with id 110 ****
 **** permissions for /dev/dri/renderD128 are good ****
 **** adding /dev/dri/card1 to video group video with id 44 ****
 **** permissions for /dev/dri/card0 are good ****
 [custom-init] No custom files found, skipping...
 [xx:xx:xx] [INF] [1] Main: Jellyfin version: 10.9.11
 [xx:xx:xx] [INF] [1] Main: Environment Variables: ["[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_DATA_DIR, /config/data]", "[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]"]
 [xx:xx:xx] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
 [xx:xx:xx] [INF] [1] Main: Operating system: Ubuntu 24.04.1 LTS
 [xx:xx:xx] [INF] [1] Main: Architecture: Arm64
 [xx:xx:xx] [INF] [1] Main: 64-Bit Process: True
 [xx:xx:xx] [INF] [1] Main: User Interactive: True
 [xx:xx:xx] [INF] [1] Main: Processor count: 8
 [xx:xx:xx] [INF] [1] Main: Program data path: /config/data
 [xx:xx:xx] [INF] [1] Main: Log directory path: /config/log
 [xx:xx:xx] [INF] [1] Main: Config directory path: /config
 [xx:xx:xx] [INF] [1] Main: Cache path: /config/cache
 [xx:xx:xx] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web
 [xx:xx:xx] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
 [xx:xx:xx] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /config/cache
 [xx:xx:xx] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
 [xx:xx:xx] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: xxx
 [xx:xx:xx] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
 [xx:xx:xx] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: xxx
 [xx:xx:xx] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: xxx
 [xx:xx:xx] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
 [xx:xx:xx] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is Allowlist
 [xx:xx:xx] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
 [xx:xx:xx] [INF] [1] Main: Kestrel is listening on 0.0.0.0
 [xx:xx:xx] [WRN] [1] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: The WebRootPath was not found: /run/s6-rc:s6-rc-init:LNAObJ/servicedirs/svc-jellyfin/wwwroot. Static files may be unavailable.
 [xx:xx:xx] [INF] [1] Emby.Server.Implementations.ApplicationHost: Running startup tasks
 System.IO.IOException: The configured user limit (8192) on the number of inotify watches has been reached, or the operating system failed to allocate a required resource.
 [xx:xx:xx] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version 6.0.1
 [xx:xx:xx] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available decoders: ["libdav1d", "av1", "av1_rkmpp", "h264", "h264_rkmpp", "hevc", "hevc_rkmpp", "mpeg1_rkmpp", "mpeg2video", "mpeg2_rkmpp", "mpeg4", "mpeg4_rkmpp", "msmpeg4", "vp8", "vp8_rkmpp", "libvpx", "vp9", "vp9_rkmpp", "libvpx-vp9", "aac", "ac3", "dca", "flac", "mp3", "truehd"]
 [xx:xx:xx] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available encoders: ["libsvtav1", "libx264", "h264_v4l2m2m", "h264_rkmpp", "libx265", "hevc_rkmpp", "mpeg4", "msmpeg4", "libvpx", "libvpx-vp9", "aac", "libfdk_aac", "ac3", "alac", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"]
 [xx:xx:xx] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["overlay_opencl", "overlay_rkrga", "scale_opencl", "scale_rkrga", "tonemap_opencl", "vpp_rkrga", "zscale", "alphasrc"]
 [xx:xx:xx] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: scale_cuda with option Output format (default "same") is not available
 [xx:xx:xx] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: tonemap_cuda with option GPU accelerated HDR to SDR tonemapping is not available
 [xx:xx:xx] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: overlay_vaapi with option Action to take when encountering EOF from secondary input is not available
 [xx:xx:xx] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: overlay_vulkan with option Action to take when encountering EOF from secondary input is not available
 [xx:xx:xx] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["drm", "opencl", "rkmpp"]
 [xx:xx:xx] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: /usr/lib/jellyfin-ffmpeg/ffmpeg
 [xx:xx:xx] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: d2e6eece4bbf45b7a1c0765dabd3f9c0
 [xx:xx:xx] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete
 [xx:xx:xx] [INF] [1] Main: Startup complete 0:00:14.0458883
 [ls.io-init] done.
github-actions[bot] commented 1 day ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Hempflingclub commented 1 day ago

Was previously ignored (#252) This should hold the necesarry information basically: https://jellyfin.org/docs/general/administration/hardware-acceleration/rockchip

But mostly there are missing MMP / RGA / OpenCL drivers, not sure if there is more configuration needed though

MPP RGA OpenCL