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

[Issue]: RKMPP - Missing package in Docker, or missing documentation step? #11475

Open
1 task done
ShinySaana opened this issue May 1, 2024 · 3 comments · May be fixed by jellyfin/jellyfin.org#975
Open
1 task done
Labels
bug Something isn't working

Comments

@ShinySaana
Copy link

Please describe your bug

When trying to setup RKMPP transcoding for a Docker installation on my RK3588-based SBC following this documentation page, I hit this segfault:

Inside a privileged Docker container:

/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 --disab
le-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libass --enable-li
bfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enabl
e-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- --t
oolchain=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
Failed creating base context during opening of kernel driver.
Kernel module may not have been loaded
[AVHWDeviceContext @ 0xaaab1fee4f00] 1 OpenCL platforms found.
[AVHWDeviceContext @ 0xaaab1fee4f00] 1 OpenCL devices found on platform "ARM Platform".
arm_release_ver: g13p0-01eac0, rk_so_ver: 10
Failed creating base context during opening of kernel driver.
Kernel module may not have been loaded
[AVHWDeviceContext @ 0xaaab1fee4f00] 0.0: ARM Platform / Unknown Device
Segmentation fault (core dumped)

Trying to debug, I installed the "ARM Mali OpenCL runtime" with this package on the host, following the installation steps for a host:

dpkg -i ./libmali-valhall-g610-g13p0-gbm_1.9-1_arm64.deb

The same command from earlier now goes on without a segfault:

/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 @ 0xaaaafa359f00] 1 OpenCL platforms found.
[AVHWDeviceContext @ 0xaaaafa359f00] 1 OpenCL devices found on platform "ARM Platform".
[AVHWDeviceContext @ 0xaaaafa359f00] 0.0: ARM Platform / Mali-G610 r0p0
[AVHWDeviceContext @ 0xaaaafa359f00] cl_arm_import_memory found as platform extension.
[AVHWDeviceContext @ 0xaaaafa359f00] cl_khr_image2d_from_buffer found as platform extension.
[AVHWDeviceContext @ 0xaaaafa359f00] 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'

This can be reproduced by uninstalling the libmali-valhall-g610-g13p0-gbm_1.9-1_arm64.deb package.

Results are similar when running jellyfin-ffmpeg6 on the host.\

Is the Docker image incomplete, or is the documentation not sufficient for this use case?

Reproduction Steps

  1. On a "fresh" Armbian install on a RK3588-based SBC
  2. Spawn a jellyfin/jellyfin:2024050117 Docker container with the command referenced here
  3. docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device rkmpp=rk -init_hw_device opencl=ocl@rk
  4. dpkg -i ./libmali-valhall-g610-g13p0-gbm_1.9-1_arm64.deb
  5. Step 3 again

Jellyfin Version

Unstable (master branch)

if other:

docker - jellyfin/jellyfin:2024050117

Environment

- OS: Armbian 24.5.0-trunk.417 bookworm
- Linux Kernel: 6.1.43-vendor-rk35xx
- Virtualization: Docker
- Clients: N/A
- Browser: N/A
- FFmpeg Version: 6.0.1-Jellyfin
- Playback Method: N/A
- Hardware Acceleration: None
- GPU Model: N/A (RK3588)
- Plugins: None
- Reverse Proxy: N/A
- Base URL: N/A
- Networking: N/A
- Storage: N/A

Jellyfin logs

N/A

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ShinySaana ShinySaana added the bug Something isn't working label May 1, 2024
@felix920506
Copy link
Member

This looks like an issue with packaging and should be moved to the packaging repo
cc @joshuaboniface @nyanmisaka

@jellyfin-bot jellyfin-bot added this to Needs triage in Issue Triage for Main Repo May 1, 2024
@gnattu
Copy link
Member

gnattu commented May 2, 2024

No, this is not a packaging issue just like we cannot actually package the intel GPU firmware. The document actually mentioned that you need to install required firmware on host for docker:

Check the OpenCL runtime status, make sure you have installed the GPU firmware of the libmali.

But what is an “libmali gpu firmware” is probably unclear to inexperienced users as they don’t understand this term.

@felix920506
Copy link
Member

Ok yeah I see the problem in the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Wrong Repo
Development

Successfully merging a pull request may close this issue.

3 participants