dwarfman78 Posted February 21 Posted February 21 Hi, I'm trying to get h264 encoding working but VAINFO keeps searching for rockchip_drv_video.so which is nowhere to be found on my system. Is there a way to get h264 encoding working with armbian OR do I have to use radxa oses (or the ubuntu version provided by Joshua Riek) ? Thanks. 0 Quote
Werner Posted February 21 Posted February 21 Try building an image with vendor kernel and mesa-vpu extension enabled. Not sure if a pre-built one is available. 0 Quote
eselarm Posted February 21 Posted February 21 5 hours ago, dwarfman78 said: Is there a way to get h264 encoding working with armbian What I did for both NanoPi-R6C and Rock3A is install linux-image-vendor-rk35xx and jellyfin-ffmpeg7 The Zero 3W is rk3566 and should have upto 1080p60 H264 real-time encoding speed if you use h264_rkmpp as output codec. Note that this is only CLI and file and/or stream based transcoding. I have no clue if it works in a webbrowser with camera and/or videoconferencing. 0 Quote
dwarfman78 Posted Tuesday at 07:21 PM Author Posted Tuesday at 07:21 PM On 2/21/2025 at 1:35 PM, Werner said: Try building an image with vendor kernel and mesa-vpu extension enabled. Not sure if a pre-built one is available. Thanks, I am already using the latest vendor kernel, is there a way to enable mesa-vpu extension afterward or do I have to recompile the kernel entirely ? 0 Quote
dwarfman78 Posted Tuesday at 09:01 PM Author Posted Tuesday at 09:01 PM (edited) vainfo --display drm --device /dev/dri/renderD128 | grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version" libva info: VA-API version 1.20.0 libva info: Trying to open /usr/lib/aarch64-linux-gnu/dri/rockchip_drv_video.so libva info: va_openDriver() returns -1 vaInitialize failed with error code -1 (unknown libva error),exit vainfo --display drm --device /dev/dri/renderD129 | grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version" libva info: VA-API version 1.20.0 libva info: Trying to open /usr/lib/aarch64-linux-gnu/dri/panfrost_drv_video.so libva info: va_openDriver() returns -1 vaInitialize failed with error code -1 (unknown libva error),exit Those files are not found : sudo find / -name "*_drv_video.so" /usr/lib/aarch64-linux-gnu/dri/radeonsi_drv_video.so /usr/lib/aarch64-linux-gnu/dri/d3d12_drv_video.so /usr/lib/aarch64-linux-gnu/dri/nouveau_drv_video.so /usr/lib/aarch64-linux-gnu/dri/virtio_gpu_drv_video.so /usr/lib/aarch64-linux-gnu/dri/r600_drv_video.so Edited Tuesday at 09:08 PM by dwarfman78 0 Quote
Werner Posted yesterday at 04:33 AM Posted yesterday at 04:33 AM 9 hours ago, dwarfman78 said: is there a way to enable mesa-vpu extension afterward or do I have to recompile the kernel entirely ? Unfortunately no. But this is basically what happens while building when this extension is enabled: https://github.com/armbian/build/blob/main/extensions/mesa-vpu.sh 0 Quote
maka Posted yesterday at 08:13 AM Posted yesterday at 08:13 AM There is rockchip-vdec2 in edge images that gives you support for h264. 0 Quote
dwarfman78 Posted yesterday at 10:59 PM Author Posted yesterday at 10:59 PM I've found this repository which provides the VAAPI driver : https://github.com/qqdasb/libva-rkmpp vainfo --display drm --device /dev/dri/renderD128 | grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version" libva info: VA-API version 1.20.0 libva info: Trying to open /usr/lib/aarch64-linux-gnu/dri/rockchip_drv_video.so libva info: Found init function __vaDriverInit_1_20 libva info: va_openDriver() returns 0 vainfo: Driver version: Rockchip Driver 1.0 However I have a new error : libva info: VA-API version 1.20.0 libva info: Trying to open /usr/lib/aarch64-linux-gnu/dri/rockchip_drv_video.so libva info: Found init function __vaDriverInit_1_20 libva info: va_openDriver() returns 0 [2025-02-26 23:58:44.486]: Info: vaapi vendor: Rockchip Driver 1.0 [2025-02-26 23:58:44.487]: Error: [AVHWFramesContext @ 0xaaaae273d480] Failed to create surface: 10 (attribute not supported). [2025-02-26 23:58:44.487]: Error: [AVHWFramesContext @ 0xaaaae273d480] Unable to allocate a surface from internal buffer pool. [2025-02-26 23:58:44.492]: Info: Encoder [vaapi] failed 0 Quote
eselarm Posted 10 hours ago Posted 10 hours ago (edited) 14 hours ago, dwarfman78 said: [2025-02-26 23:58:44.487]: Error: [AVHWFramesContext @ 0xaaaae273d480] Failed to create surface: 10 (attribute not supported). Can you maybe tell us what your (end-user) use case is? It might be simply that some feature in HW codec is not supported. What do you feed the encoder and how? And what is your base working method if SW encoding ? Maybe that must be done non-real-time and is that the reason you want HW? How can others reproduce? Also that github is 9 years old. I see some V4L2, but the whole issue is that Rockchip is not V4L2. They have their own rkmpp standard. Same but worse and/or un-usable stuff from Allwinner. Amlogic I don't know. Qualcomm and RPi are V4L2 and also new Radxa Orion O6 SoC AFAIK. Edited 10 hours ago by eselarm 0 Quote
dwarfman78 Posted 3 hours ago Author Posted 3 hours ago 7 hours ago, eselarm said: Can you maybe tell us what your (end-user) use case is? It might be simply that some feature in HW codec is not supported. What do you feed the encoder and how? I am trying to stream my display with sunshine (https://app.lizardbyte.dev/Sunshine/) which supports only nvenc,amd vce or vaapi. With software encoding there's only 8 frames per second output and 50% CPU usage. 0 Quote
eselarm Posted 2 hours ago Posted 2 hours ago On https://docs.lizardbyte.dev/projects/sunshine/latest/ I see: Quote with support for AMD, Intel, and Nvidia GPUs for hardware encoding so there is no Rockchip rkmpp, not even ARM. As I indicated, jellyfin has ffmpeg binaries that can use HW encoders in Rockchips https://jellyfin.org/docs/general/administration/hardware-acceleration/rockchip https://repo.jellyfin.org/?path=/ffmpeg/debian/latest-7.x/arm64 Those provide you a core method to grab screen as input and encoded h264 wih e certain container protocol as output. I think output is mostly FLV, RTMP for gaming. I use it for RPi cameras and/with NGINX. Screen/display as input, see ffmpeg docs or see OBS as example. I have no clue what protocol etc sunshine uses. Maybe you configure software encoding but with a script hook somehow with ffmpeg. See how that can be done with MediaMTX for example. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.