• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Issues with HW transcoding - RK3588

    Pages (2): 1 2 Next »

     
    • 0 Vote(s) - 0 Average

    Issues with HW transcoding - RK3588

    HW transcoding fails on RK3588 in docker
    krimanas
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    #1
    2025-01-02, 11:10 AM (This post was last modified: 2025-01-02, 01:12 PM by krimanas. Edited 1 time in total.)
    Hi, I am having issues with getting HW transcoding to work. Some hints on what is causing the transcoding to fail would be great!

    Error description: After enabling Hardware acceleration, and trying to play a HDR video on my Iphone, It fails with error
    Code:
    The AVPlayerItem instance has failed with error code -1008 and domain "NSURLErrorDomain".

    Logs:

    .txt   logfile.txt (Size: 22.42 KB / Downloads: 46)

    Transcoding logs:

    .txt   transcoding logs.txt (Size: 59.62 KB / Downloads: 46)

    Docker Compose.yaml:
    Code:
    services:
      jellyfin:
        image: jellyfin/jellyfin
        container_name: jellyfin
        network_mode: 'host'
        command: dev in dri dma_heap mali0 rga mpp_service iep mpp-service vpu_service
                vpu-service hevc_service hevc-service rkvdec rkvenc vepu h265e ; do
                [ -e "/dev/$dev" ] && echo " --device /dev/$dev"; done`
        volumes:
          - /srv/dev-disk-by-uuid-0c682871-98c7-43e2-a8aa-e930b5b3aed4/jellyfin/config:/config
          - /srv/dev-disk-by-uuid-0c682871-98c7-43e2-a8aa-e930b5b3aed4/jellyfin/cache:/cache
          - type: bind
            source:  /srv/dev-disk-by-uuid-0c682871-98c7-43e2-a8aa-e930b5b3aed4/Home_NAS/Media
            target: /media
        ports:
          - "8096:8096"
        restart: 'unless-stopped'

    Setup:
    HW:
    • SoC: Rockchip RK3588
      • CPU: Quad-core ARM Cortex-A76(up to 2.4GHz) and quad-core Cortex-A55 CPU (up to 1.8GHz)
      • GPU: Mali-G610 MP4, compatible with OpenGLES 1.1, 2.0, and 3.2, OpenCL up to 2.2 and Vulkan1.2
      • VPU: 8K@60fps H.265 and VP9 decoder, 8K@30fps H.264 decoder, 4K@60fps AV1 decoder, 8K@30fps H.264 and H.265 encoder
      • NPU: 6TOPs, supports INT4/INT8/INT16/FP16
    • RAM: 64-bit 4GB
    SW:
    • OS: Debian 12 Core
    • Jellyfin 10.10.3 ran with Docker compose
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-01-02, 01:38 PM
    What kernel are you running?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    krimanas
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    #3
    2025-01-02, 02:09 PM
    (2025-01-02, 01:38 PM)TheDreadPirate Wrote: What kernel are you running?

    Debian-bookworm-core-6.1-arm64 6.1.57
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2025-01-02, 02:48 PM
    You need to be using the Rockchip BSP kernel.

    https://jellyfin.org/docs/general/admini...nux-setups
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    krimanas
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    #5
    2025-01-02, 04:28 PM
    (2025-01-02, 02:48 PM)TheDreadPirate Wrote: You need to be using the Rockchip BSP kernel.

    https://jellyfin.org/docs/general/admini...nux-setups

    Ah, I think I am?
    I am using rk3588-XYZ-debian-bookworm-core-6.1-arm64-YYYYMMDD.img.gz
    From https://wiki.friendlyelec.com/wiki/index...cial_image
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2025-01-02, 04:38 PM
    @nyanmisaka - Any ideas, Nyan?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    kanron
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Jan
    Reputation: 0
    #7
    2025-01-04, 09:18 PM
    To piggyback off of this, I also can't get hardware decode/encode to work on the Rockchip 3588.

    My setup is as follows.
    * Hardware
      * FriendlyElec CM3588 Plus with the NAS SDK (32 GB RAM)
      * 4x NVMe drives
    * Software
      * Debian 12 base (installed from vendor-provided image, rk3588-eflasher-debian-bookworm-core-6.1-arm64-20241225.img.gz)
      * Kernel 6.1.57
      * ZFS on Linux
      * Openmediavault 7.4.17-2
      * omv-compose and omv-extras docker repo activated
      * Jellyfin docker container pulled through the "Add from examples" option in omv-compose

    I have completed the steps outlined in the documentation, namely
    * Checked for the existence of dma_heap, dri, mpp_service and rga in /dev on my host system -> OK
    * Installed the ARM Mali OpenCL runtime (libmali) on host (v1.9-1-55611b0 since I'm neither on Ubuntu nor Armbian - I hope this was correct?
    * Passed the relevant devices into the container (namely dma_heap, dri, mpp_service and rga, plus mali0 during troubleshooting attempts).

    My docker-compose file looks as follows:

    Code:
    ---
    # https://hub.docker.com/r/linuxserver/jellyfin
    services:
      jellyfin:
        image: lscr.io/linuxserver/jellyfin:latest
        container_name: jellyfin
        environment:
          - PUID=1000
          - PGID=1000
          - TZ=Etc/UTC
          - JELLYFIN_PublishedServerUrl=omv-nas.fritz.box:8096/ #optional
        volumes:
          - CHANGE_TO_COMPOSE_DATA_PATH/jellyfin/library:/config
          - CHANGE_TO_COMPOSE_DATA_PATH/jellyfin/tvseries:/data/tvshows
          - CHANGE_TO_COMPOSE_DATA_PATH/jellyfin/movies:/data/movies
          - type: bind
            source: /zfs-nvme/media/Medien/Filme
            target: /movies
            read_only: true
          - type: bind
            source: /zfs-nvme/media/Medien/Serien
            target: /tvshows
            read_only: true
        devices:
          - "/dev/dma_heap:/dev/dma_heap"
          - "/dev/dri:/dev/dri"
          - "/dev/mpp_service:/dev/mpp_service"
          - "/dev/rga:/dev/rga"
          - "dev/mali0:/dev/mali0"
        ports:
          - 8096:8096
        restart: unless-stopped

    I have attached the output of clinfo on the host (file 01...), the output of the test command inside the container (file 02...) and the corresponding logs from when the web player tells me playback had to be stopped due to a problem.

    I've tried to troubleshoot this to the best of my abilities, using google and GPT alike, but so far, no dice. The ffmpeg log says something about a failed device initialisation:

    Code:
    [hevc_rkmpp @ 0x5591452cb0] Failed to init MPP context: -1
    [vist#0:0/hevc @ 0x559140ef30] [dec:hevc_rkmpp @ 0x5591444190] Error while opening decoder: Generic error in an external library
    [vost#0:0/h264_rkmpp @ 0x5591442ae0] Error initializing a simple filtergraph
    Error opening output file /config/cache/transcodes/b809758c684ae89f5e1068c983d5ac77.m3u8.
    Error opening output files: Generic error in an external library

    The jellyfin log talks about an ffmpeg error code 187.

    The output of the ffmpeg debug command inside the container looks to me like it might indicate some problem:

    Code:
    [AVHWDeviceContext @ 0x5599053460] 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

    Did I screw up the setup for my GPU passthrough to the container somehow? They are, however, showing up inside the container:

    Code:
    root@24a170bd6af7:/# ls /dev
    core  dma_heap  dri  fd  full  mali0  mpp_service  mqueue  null  ptmx  pts  random  rga  shm  stderr  stdin  stdout  tty  urandom  zero

    Any help would be very much appreciated.


    Attached Files
    .txt   04 Log_FFmpeg.txt (Size: 10.95 KB / Downloads: 38)
    .txt   01 clinfo.txt (Size: 28.87 KB / Downloads: 46)
    .txt   03 Log_jf.txt (Size: 33.49 KB / Downloads: 37)
    .txt   02 container ffmpeg debug.txt (Size: 2.22 KB / Downloads: 40)
    hedefalk
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2025 May
    Reputation: 0
    Country:Sweden
    #8
    2025-05-23, 02:16 PM (This post was last modified: 2025-05-23, 03:09 PM by hedefalk. Edited 3 times in total.)
    I'm having the same issue.

    I'm also running jellyfin on a FriendlyElec CM3588 Plus with the NAS SDK (32 GB RAM)

    I'm running on a k3s cluster, but I've mapped the devices I think are needed (not mali0 though, but I have deselected tone mapping:



    root@jellyfin-5d8cbd85c9-9btsrConfused-face# ls -l /dev | grep -E "mpp|rga|dri|dma_heap"
    drwxr-xr-x 2 root root        160 Jan  1  1970 dma_heap
    drwxr-xr-x 3 root root        140 Jan 26  2024 dri
    crw------- 1 root root    241,  0 Jan 26  2024 mpp_service
    crw------- 1 root root    10, 122 Jan 26  2024 rga


    I guess most relevant thing here is what got me to find this thread:

    >Failed to set value 'opencl=ocl@rk' for option 'init_hw_device': No such device



    root@jellyfin-5d8cbd85c9-9btsrConfused-face# /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device rkmpp=rk -init_hw_device opencl=ocl@rk
    ffmpeg version 7.1.1-Jellyfin Copyright © 2000-2025 the FFmpeg developers
      built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
      configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --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-libharfbuzz --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 --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
      libavutil      59. 39.100 / 59. 39.100
      libavcodec    61. 19.101 / 61. 19.101
      libavformat    61.  7.100 / 61.  7.100
      libavdevice    61.  3.100 / 61.  3.100
      libavfilter    10.  4.100 / 10.  4.100
      libswscale      8.  3.100 /  8.  3.100
      libswresample  5.  3.100 /  5.  3.100
      libpostproc    58.  3.100 / 58.  3.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 @ 0x55a12d6f00] 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




    In the jellyfin main logs I see:


    MediaBrowser.Common.FfmpegException: FFmpeg exited with code 187

    and in the ffmpegtranscode logs I have:


    [hevc_rkmpp @ 0x558e173500] Failed to init MPP context: -1
    [vist#0:0/hevc @ 0x558dcdfeb0] [dec:hevc_rkmpp @ 0x558e172d80] Error while opening decoder: Generic error in an external library
    [fc#0 @ 0x558dc92750] Error binding an input stream to complex filtergraph input setparams:default.
    Error binding filtergraph inputs/outputs: Generic error in an external library




    On my host I'm only seeing a subset of the devices listed in the docs, but this exact subset is mentioned here too:

    root@CM3588-Plus:~# for dev in dri dma_heap mali0 rga mpp_service \
    iep mpp-service vpu_service vpu-service \
    hevc_service hevc-service rkvdec rkvenc vepu h265e ; do \
    [ -e "/dev/$dev" ] && echo " --device /dev/$dev"; \
    done
    --device /dev/dri
    --device /dev/dma_heap
    --device /dev/mali0
    --device /dev/rga
    --device /dev/mpp_service

    Are these other devices needed too?
    nyanmisaka
    Offline

    Team Member

    Posts: 258
    Threads: 0
    Joined: 2023 Jun
    Reputation: 10
    #9
    2025-05-23, 04:01 PM
    Do not use the linuxserver.io image on RK3588, as it does not include the OpenCL runtime. Use the official image jellyfin/jellyfin.

    Another "Failed to init MPP context: -1" means missing permissions. Add one of the following settings to your docker configuration:


    --privileged



    --security-opt systempaths=unconfined --security-opt apparmor=unconfined


    https://jellyfin.org/docs/general/post-i...ualization
    hedefalk
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2025 May
    Reputation: 0
    Country:Sweden
    #10
    2025-05-23, 07:11 PM
    (2025-05-23, 04:01 PM)nyanmisaka Wrote: Do not use the linuxserver.io image on RK3588, as it does not include the OpenCL runtime. Use the official image jellyfin/jellyfin.


    This was key if for me. I was using hotio/jellyfin for some reason I no longer remember, but switched out now for the official jellyfin/jellyfin and now everything runs smooth. Thanks a lot!  Folded-hands
    Pages (2): 1 2 Next »

    « Next Oldest | Next Newest »

    Users browsing this thread: 2 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode