[HW Accel Support]: RK3328 (rock64) with '-rk' images #12577
Replies: 6 comments 23 replies
-
if privileged mode is enabled then the host is providing it, if it is not privileged then you must add to the docker command to map the right items in. the other questions I must relay to @MarcA711 |
Beta Was this translation helpful? Give feedback.
-
Hey, I have not much knowledge about this soc (It is a somewhat older generation), but you might have two options:
maybe try to contact ayufan, he might be able to help you get a distro with all necessary drivers |
Beta Was this translation helpful? Give feedback.
-
Thank you so much !! Much clearer now. Also according to this, I guess I shouldn't try higher than 5.1 right ? (Rock64 soc is based on rk3328) |
Beta Was this translation helpful? Give feedback.
-
I created issues in ffmpeg-rockchip and ayufan's repositories, and on LibreElec forum, we'll see how it goes :) |
Beta Was this translation helpful? Give feedback.
-
LibreElec seems to be based on mainline (see forum link)... Not sure yet if they make use of hardware acceleration. And as you pointed, information about mainline hw acceleration support is maybe not up to date: I don't really understand how it works though (once again ^^). So... new questions :) 1. Is V4L2 supposed to be the preferred way to access video devices in newer kernels ?Maybe Frigate (or ffmpeg) is planning to migrate to V4L2 in the future (if not available already) ? 2. Is this why we need to modify and recompile ffmpeg ?I guess we then need to pass custom parameters to ffmpeg in Frigate, correct ? I cannot find a lot of reference to v4l2 in Frigate documentation, could you point me to a guide or instructions so I can get started with it ? Thank you ! |
Beta Was this translation helpful? Give feedback.
-
Back with some news, but no success yet. I tried several ffmepg on 'regular' (non-BSP) kernels: 1. Current distribution ffmpeg (package manager)Ayufan Buster with 6.0.0 kernel, here is the log:
2. Prebuilt 'vanilla' ffmpegDownloaded from:
3. Libreelec 12 (kernel 6.10)Binary installed from their 'ffmpeg-tools' package, see here.
So... no luck so far. I'm trying to compile Kwiboo's version (branch v4l2request-2024-v2) with "--enable-v4l2-request" but struggling with dependencies. Although I think I have everything, I still get this error message:
It has very recent (yesterday) commits though so not sure it's compatible with my older kernel... I don't find documentation about building this specific fork. Let me know if you have some advices to share. |
Beta Was this translation helpful? Give feedback.
-
Describe the problem you are having
Hi,
My apologies if this topic seems recurring, but after reading 10's of page on various forums, I still don't have a clear idea on how it is supposed to work.
My current setup is a Rock64 running on Ayufan's OMV 5 distribution. Since then I updated kernel up to '6.0.0-1164-ayufan-ga2fd0c498'.
Now I discover Frigate and the amazing world of transcoding, detectors... and potential hardware acceleration :)
With 4 cameras (1920x1080) streams (via go2rtc), I am close to a constant 100% cpu just for ffmpeg... So I'm wondering if I could get the hw acceleration working on this board, with my limited knowledge (Spoiler: No).
For now I just tried to:
privileged: true
in Portainer stackHere are some of the logs (same error for all cameras):
After getting a bash in the container and testing ffmpeg directly with:
I get:
This is where I started to read about hw acceleration on rockchip boards and realized I don't understand much about how this works :)
Here are my questions:
When using the docker image, should the host kernel provide some entries to the hw acceleration, or is this all handled from the container (hence privileged mode required) ?
What are the candidate kernels/distribution with such capability ?
I saw a lot of references to 5.10 and 6.1, but neither appear on my apt list...
From what I (poorly) understand, board vendors usually create kernels (bsp) exposing hw capabilities that end-up either integrated into mainline, or adapted to limited linux distributions (depending on community). Correct ?
Is it what Ayufan was providing for armbian on rockchip ?
I can't figure a timeline of what solutions were made available to access hw acceleration on this board (kernels, patches, scripts, ...), and what would be the optimal solution today...
Would it be possible to get a 'proper kernel' running with my current setup ?
If not, is there a debian distribution (I need OMV running) available for this board with the 'proper kernel' ?
That's already a lot, sorry... :)
Thank you for your help.
Version
0.14.0-a4eb435
Frigate config file
docker-compose file or Docker CLI command
Relevant log output
FFprobe output from your camera
Operating system
Debian
Install method
Docker Compose
Network connection
Wired
Camera make and model
Dafang (wize)
Any other information that may be helpful
No response
Beta Was this translation helpful? Give feedback.
All reactions