Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
Hempflingclub opened this issue Oct 22, 2024 · 8 comments
Open
1 task done

Comments

@Hempflingclub
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

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.
Copy link

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

@Hempflingclub
Copy link
Author

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

@charlesomer
Copy link

charlesomer commented Oct 28, 2024

I think I'm seeing a similar issue now too but on an Intel 8400, this used to work:

libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55c0d116eac0] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl=ocl@va' for option 'init_hw_device': No such device
Error parsing global options: No such device

I have the OpenCL docker mod enabled

EDIT: This seems to work again if I use linuxserver/mods:jellyfin-opencl-intel-24.35.30872.22 instead of latest

@seanob86
Copy link

seanob86 commented Oct 29, 2024

I think I'm seeing a similar issue now too but on an Intel 8400, this used to work:

libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55c0d116eac0] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl=ocl@va' for option 'init_hw_device': No such device
Error parsing global options: No such device

I have the OpenCL docker mod enabled

EDIT: This seems to work again if I use linuxserver/mods:jellyfin-opencl-intel-24.35.30872.22 instead of latest

I encountered the same issue on intel but couldn't figure it out; although i suspected it was due to the latest opencl version. In hindsight I should have attempted downgrading the docker-mod.

Ended up reverting to the official jellyfin docker image where opencl is more happy there (and built into the image).

@charlesomer
Copy link

Yeah I've heard the official image works properly too. I just had to rebuild the image too because I encountered the same problem again. Not sure why it would be working at one point, fail, then work again after recreating the image (without changing the version from the linuxserver/mods:jellyfin-opencl-intel-24.35.30872.22 tag.

@LinuxServer-CI
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@charlesomer
Copy link

Looks like this is due to platforms now being marked as legacy and are no longer going to be receiving feature updates.

https://github.com/intel/compute-runtime/blob/master/LEGACY_PLATFORMS.md

Latest compatible version at the time of writing is 24.35.30872.22.

@LinuxServer-CI
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Issues
Development

No branches or pull requests

4 participants