Jump to content

Recommended Posts

Posted

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.

<
Posted

Try building an image with vendor kernel and mesa-vpu extension enabled. Not sure if a pre-built one is available.

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

Posted
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 ?

Posted (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 by dwarfman78
Posted

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

 

Posted (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 by eselarm
Posted
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.

Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines