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] Video Hardware Acceleration Fails on Rockchip RK3588 Device #252

Closed
1 task done
woiza opened this issue Jun 4, 2024 · 4 comments
Closed
1 task done

[BUG] Video Hardware Acceleration Fails on Rockchip RK3588 Device #252

woiza opened this issue Jun 4, 2024 · 4 comments

Comments

@woiza
Copy link

woiza commented Jun 4, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Latest linuxserver/jellyfin image/container on my RK3588 device (Radxa Rock 5B):

docker exec -it jellyfin /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 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  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-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 @ 0xaaaaf76e0a00] 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

Latest jellyfin/jellyfin image/container on my RK3588 device (Radxa Rock 5B):

docker exec -it jellyfin-root /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 12 (Debian 12.2.0-14)
  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-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.
arm_release_ver: g13p0-01eac0, rk_so_ver: 10
[AVHWDeviceContext @ 0xaaaaee29bf00] 1 OpenCL platforms found.
[AVHWDeviceContext @ 0xaaaaee29bf00] 1 OpenCL devices found on platform "ARM Platform".
[AVHWDeviceContext @ 0xaaaaee29bf00] 0.0: ARM Platform / Mali-G610 r0p0
[AVHWDeviceContext @ 0xaaaaee29bf00] cl_arm_import_memory found as platform extension.
[AVHWDeviceContext @ 0xaaaaee29bf00] cl_khr_image2d_from_buffer found as platform extension.
[AVHWDeviceContext @ 0xaaaaee29bf00] DRM to OpenCL mapping on ARM function found (clImportMemoryARM).
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

Steps To Reproduce

https://jellyfin.org/docs/general/administration/hardware-acceleration/rockchip/

Environment

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

https://docs.docker.com/engine/install/debian/#install-using-the-repository



### CPU architecture

arm64

### Docker creation

```bash
services:
  jellyfin:
    image: linuxserver/jellyfin
    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
    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:    1000
User GID:    1000
───────────────────────────────────────

**** creating video group videorui4 with id 105 ****
**** adding /dev/dri/renderD129 to video group videorui4 with id 105 ****
**** 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...
[10:55:16] [INF] [1] Main: Jellyfin version: 10.9.4
[10:55:16] [INF] [1] Main: Environment Variables: ["[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]", "[JELLYFIN_DATA_DIR, /config/data]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_CACHE_DIR, /config/cache]"]
[10:55:16] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
[10:55:16] [INF] [1] Main: Operating system: Ubuntu 22.04.4 LTS
[10:55:16] [INF] [1] Main: Architecture: Arm64
[10:55:16] [INF] [1] Main: 64-Bit Process: True
[10:55:16] [INF] [1] Main: User Interactive: True
[10:55:16] [INF] [1] Main: Processor count: 8
[10:55:16] [INF] [1] Main: Program data path: /config/data
[10:55:16] [INF] [1] Main: Log directory path: /config/log
[10:55:16] [INF] [1] Main: Config directory path: /config
[10:55:16] [INF] [1] Main: Cache path: /config/cache
[10:55:16] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web
[10:55:16] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[10:55:17] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /config/cache
[10:55:17] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[10:55:17] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly InfuseSync, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null from /config/data/plugins/InfuseSync_1.5.0.0/InfuseSync.dll
[10:55:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[10:55:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
[10:55:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[10:55:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["127.0.0.1", "192.168.160.2", "172.18.0.6"]
[10:55:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
[10:55:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is Allowlist
[10:55:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
[10:55:19] [INF] [1] InfuseSync.Plugin: InfuseSync is starting.
[10:55:19] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: InfuseSync 1.5.0.0
[10:55:19] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: TMDb 10.9.4.0
[10:55:19] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Studio Images 10.9.4.0
[10:55:19] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: OMDb 10.9.4.0
[10:55:19] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: MusicBrainz 10.9.4.0
[10:55:19] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: AudioDB 10.9.4.0
[10:55:20] [WRN] [1] Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository: Using an in-memory repository. Keys will not be persisted to storage.
[10:55:20] [WRN] [1] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
[10:55:20] [INF] [1] Main: Kestrel is listening on 0.0.0.0
[10:55:20] [WRN] [1] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: No XML encryptor configured. Key {2c8ceeb2-ae20-4824-b132-a6b6a69cc299} may be persisted to storage in unencrypted form.
[10:55:21] [WRN] [1] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: The WebRootPath was not found: /run/s6-rc:s6-rc-init:PcapDJ/servicedirs/svc-jellyfin/wwwroot. Static files may be unavailable.
[10:55:21] [INF] [1] Emby.Server.Implementations.ApplicationHost: Running startup tasks
[10:55:21] [INF] [1] InfuseSync.ScheduledTasks.HousekeepingTask: Infuse housekeeping task scheduled.
[10:55:21] [INF] [8] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /data/movies
[10:55:21] [INF] [10] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /data/series
[10:55:21] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for Remove Old Cached Data set to fire at 2024-06-05 00:01:00.000 +02:00, which is 13:05:38.8082370 from now.
[10:55:21] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for Generate Trickplay Images set to fire at 2024-06-05 03:00:00.000 +02:00, which is 16:04:38.7984615 from now.
[10:55:21] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for Extract Chapter Images set to fire at 2024-06-05 02:00:00.000 +02:00, which is 15:04:38.7935018 from now.
[10:55:21] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version 6.0.1
[10:55:21] [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"]
[10:55:21] [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"]
[10:55:21] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["overlay_opencl", "overlay_rkrga", "scale_opencl", "scale_rkrga", "tonemap_opencl", "vpp_rkrga", "zscale", "alphasrc"]
[10:55:21] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: scale_cuda with option Output format (default "same") is not available
[10:55:21] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: tonemap_cuda with option GPU accelerated HDR to SDR tonemapping is not available
[10:55:21] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: overlay_vaapi with option Action to take when encountering EOF from secondary input is not available
[10:55:21] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: overlay_vulkan with option Action to take when encountering EOF from secondary input is not available
[10:55:21] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["drm", "opencl", "rkmpp"]
[10:55:21] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: /usr/lib/jellyfin-ffmpeg/ffmpeg
[10:55:21] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: f2472fa1ffad4bbf95baea0938bbec82
[10:55:21] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete
[10:55:21] [INF] [1] Main: Startup complete 0:00:05.4982443
[ls.io-init] done.
Copy link

github-actions bot commented Jun 4, 2024

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

@woiza
Copy link
Author

woiza commented Jun 4, 2024

Could you please include libmali OpenCL dependencies in your image?

https://github.com/jellyfin/jellyfin-packaging/blob/master/docker/Dockerfile#L177

@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.

Copy link

github-actions bot commented Oct 4, 2024

This issue is locked due to inactivity

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

2 participants