How to enable libdrm? #113

Closed
opened 2025-12-23 10:33:19 +01:00 by backuprepo · 1 comment
Owner

Originally created by @tongjiang on GitHub (Oct 30, 2024).

step

  1. add rkmpp libs \ includes file \write pkg-config file
  2. compile rga code in rk3588 bsp, add rkrga libs \ includes file \ write pkg-config file
  3. compile libdrm code in rk3588 bsp, add libdrm libs \ includes file \ write pkg-config file
  4. add ffmpeg configure params
./configure --target-os=${FFMPEG_TARGET_OS} --arch=${CMAKE_SYSTEM_PROCESSOR} --disable-gpl --enable-cross-compile --cross-prefix=${CONFIG_TOOLCHAIN_PATH}/${CONFIG_TOOLCHAIN_PREFIX} --prefix=${CMAKE_CURRENT_BINARY_DIR}/prefix --enable-shared --disable-static --disable-vulkan --disable-stripping --disable-doc --disable-devices --enable-version3 --enable-hwaccels --enable-rkmpp --enable-libdrm  --enable-rkrga --pkg-config=/usr/bin/pkg-config
  1. export all rkmpp rga libdrm .pc directory to PKG_CONFIG_PATH env.
  2. test
$ pkg-config --list-all|grep drm
libdrm_nouveau        libdrm_nouveau - Userspace interface to nouveau kernel DRM services
libdrm                libdrm - Rockchip DRM
libdrm_radeon         libdrm_radeon - Userspace interface to kernel DRM services for radeon
libdrm_intel          libdrm_intel - Userspace interface to intel kernel DRM services
libdrm_amdgpu         libdrm_amdgpu - Userspace interface to kernel DRM services for amdgpu

libdrm libdrm - Rockchip DRM ------------ this pkg was add by me in project.

error

but ffmpeg building process report the blow error:
ERROR: rkmpp requires --enable-libdrm

in ffmpeg build log file:ffbuild/config.log

ERROR: libdrm requested but not found

fail reason?

in ffmpeg configure file report this error

enabled rkmpp             && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
                               require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.8" rockchip/rk_mpi.h mpp_create &&
                               { enabled libdrm ||
                                 die "ERROR: rkmpp requires --enable-libdrm"; }

but I already add --enable-hwaccels --enable-libdrm in configure param.

FFMPEG_CONFIGURATION='--target-os=android --arch=aarch64 --disable-gpl --enable-cross-compile --cross-prefix=/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31- --prefix=/home/me/work/ffmpeg/prefix --enable-shared --disable-static --disable-vulkan --disable-stripping --disable-doc --disable-devices --enable-version3 --enable-hwaccels --enable-rkmpp --enable-libdrm --enable-rkrga --pkg-config=/usr/bin/pkg-config

Question:

  1. how to real enable libdrm?
  2. Is that correct to use libdrm code in rk3588 bsp and write a .pc file to let ffmpeg to find it?
  3. if i don't need to write the buffer to screen, i just need to transcode video and resize the decode image the transmit the data through network , can I disable the libdrm ? If OK, how to disable?
  4. the wiki says these param MUST add in congifure params
--enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga

I removed the --enable-gpl, is that OK?
I add --enable-gpl for test, but still got the same error.

Originally created by @tongjiang on GitHub (Oct 30, 2024). ## step 1) add rkmpp libs \ includes file \write pkg-config file 2) compile rga code in rk3588 bsp, add rkrga libs \ includes file \ write pkg-config file 3) compile libdrm code in rk3588 bsp, add libdrm libs \ includes file \ write pkg-config file 4) add ffmpeg configure params ``` ./configure --target-os=${FFMPEG_TARGET_OS} --arch=${CMAKE_SYSTEM_PROCESSOR} --disable-gpl --enable-cross-compile --cross-prefix=${CONFIG_TOOLCHAIN_PATH}/${CONFIG_TOOLCHAIN_PREFIX} --prefix=${CMAKE_CURRENT_BINARY_DIR}/prefix --enable-shared --disable-static --disable-vulkan --disable-stripping --disable-doc --disable-devices --enable-version3 --enable-hwaccels --enable-rkmpp --enable-libdrm --enable-rkrga --pkg-config=/usr/bin/pkg-config ``` 5) export all rkmpp rga libdrm .pc directory to PKG_CONFIG_PATH env. 6) test ``` $ pkg-config --list-all|grep drm libdrm_nouveau libdrm_nouveau - Userspace interface to nouveau kernel DRM services libdrm libdrm - Rockchip DRM libdrm_radeon libdrm_radeon - Userspace interface to kernel DRM services for radeon libdrm_intel libdrm_intel - Userspace interface to intel kernel DRM services libdrm_amdgpu libdrm_amdgpu - Userspace interface to kernel DRM services for amdgpu ``` libdrm libdrm - Rockchip DRM ------------ this pkg was add by me in project. ## error but ffmpeg building process report the blow error: ERROR: rkmpp requires --enable-libdrm in ffmpeg build log file:ffbuild/config.log ``` ERROR: libdrm requested but not found ``` ## fail reason? in ffmpeg configure file report this error ``` enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create && require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.8" rockchip/rk_mpi.h mpp_create && { enabled libdrm || die "ERROR: rkmpp requires --enable-libdrm"; } ``` but I already add --enable-hwaccels --enable-libdrm in configure param. ``` FFMPEG_CONFIGURATION='--target-os=android --arch=aarch64 --disable-gpl --enable-cross-compile --cross-prefix=/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31- --prefix=/home/me/work/ffmpeg/prefix --enable-shared --disable-static --disable-vulkan --disable-stripping --disable-doc --disable-devices --enable-version3 --enable-hwaccels --enable-rkmpp --enable-libdrm --enable-rkrga --pkg-config=/usr/bin/pkg-config ``` Question: 1) how to real enable libdrm? 2) Is that correct to use libdrm code in rk3588 bsp and write a .pc file to let ffmpeg to find it? 3) if i don't need to write the buffer to screen, i just need to transcode video and resize the decode image the transmit the data through network , can I disable the libdrm ? If OK, how to disable? 4) the wiki says these param MUST add in congifure params ``` --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga ``` I removed the --enable-gpl, is that OK? I add --enable-gpl for test, but still got the same error.
backuprepo 2025-12-23 10:33:19 +01:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@nyanmisaka commented on GitHub (Oct 30, 2024):

  1. Build and install https://dri.freedesktop.org/libdrm
  2. Nope. The step 1 will produce libdrm.pc
  3. Nope. Rockchip MPP is built on top of the DRM framework.
  4. You can remove --enable-gpl and only use LGPLv3 but it won't help this case.
@nyanmisaka commented on GitHub (Oct 30, 2024): 1. Build and install https://dri.freedesktop.org/libdrm 2. Nope. The step 1 will produce libdrm.pc 3. Nope. Rockchip MPP is built on top of the DRM framework. 4. You can remove `--enable-gpl` and only use LGPLv3 but it won't help this case.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/ffmpeg-rockchip#113
No description provided.