Hi guys.
I’m running the CLI Image (bookworm) on the CM5 Lite. One encoder core running, one defective (to be expected). Kernel version 6.1.43-15-rk2312, ISP version v02.04.00.
Hooked up the imx415 to my board, enabled the overlay, ran GStreamer with the following command (also tried io-mode=mmap):
gst-launch-1.0 -e \
v4l2src device=/dev/video11 io-mode=dmabuf \
! 'video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1' \
! mpph265enc \
! h265parse config-interval=1 \
! queue \
! tcpserversink host=0.0.0.0 port=5000
The video is choppy as hell (~ 15 - 20 fps max, drops to 5 fps sometimes), and crashes after 30 seconds or so. This is not a bandwidth issue, local recording (mkv, mp4 etc) yields the exact same results. It’s also not a hardware issue - there are no mipi CRC errors reported, which would happen with a defective FFC cable/ connector.
GStreamer reports:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
rga_api version 1.10.0_[9]
Redistribute latency...
Redistribute latency...
662:dst has not fd and address for render
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:32.385796429
Setting pipeline to NULL ...
Freeing pipeline ...
And from dmesg:
radxa@radxa-cm5-io:~$ [ 1670.778345] rockchip-mipi-csi2 mipi0-csi2: stream on, src_sd: 000000005f399405, sd_name:rockchip-csi2-dphy0
[ 1670.778360] rockchip-mipi-csi2 mipi0-csi2: stream ON
[ 1674.979155] rockchip-mipi-csi2 mipi0-csi2: stream off, src_sd: 000000005f399405, sd_name:rockchip-csi2-dphy0
[ 1674.979246] rockchip-mipi-csi2 mipi0-csi2: stream OFF
[ 1677.763089] rockchip-mipi-csi2 mipi0-csi2: stream on, src_sd: 000000005f399405, sd_name:rockchip-csi2-dphy0
[ 1677.763173] rockchip-mipi-csi2 mipi0-csi2: stream ON
[ 1710.025028] rk_vcodec: mpp_translate_reg_address:1816: reg[ 12]: 0xffffffff fd -1 failed
[ 1710.025069] rk_vcodec: mpp_task_dump_mem_region:2003: --- dump task 0 mem region ---
[ 1710.025086] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 0]: 0x0000000010c00000, size 2fd000
[ 1710.025103] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 1]: 0x0000000010c00000, size 2fd000
[ 1710.025120] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 2]: 0x0000000010c00000, size 2fd000
[ 1710.025136] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 3]: 0x00000000fec00000, size 334000
[ 1710.025152] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 4]: 0x00000000fec00000, size 334000
[ 1710.025168] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 5]: 0x00000000ff800000, size 334000
[ 1710.025185] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 6]: 0x00000000ff800000, size 334000
[ 1710.025201] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 7]: 0x00000000ff7e0000, size d000
[ 1710.025217] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 8]: 0x00000000febe0000, size d000
[ 1710.025233] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 9]: 0x00000000feb80000, size 22000
[ 1710.025249] rk_vcodec: mpp_task_dump_mem_region:2008: reg[ 10]: 0x00000000ff780000, size 22000
[ 1710.025272] rk_vcodec: mpp_process_task_default:614: alloc_task failed.
[ 1710.025291] rkvenc2_wait_result:2051: session 00000000a243c5d4 pending list is empty!
[ 1710.025308] rk_vcodec: mpp_msgs_wait:1612: session 15 wait result ret -5
[ 1710.048280] rockchip-mipi-csi2 mipi0-csi2: stream off, src_sd: 000000005f399405, sd_name:rockchip-csi2-dphy0
[ 1710.048293] rockchip-mipi-csi2 mipi0-csi2: stream OFF
I cannot for the life of me get this to stream for more than 60 seconds (usually around 30). The video quality is horrendous - the ISP does kick in, but to say there’s ghosting is like saying “water is somewhat wet”. And the noise is atrocious.
Not only does GStreamer crash, but more often than not, it crashes the whole system, with the only option being a power cycle.
While using GStreamer is definitely a plus, I do have some experience with rockchip’s sdk, so I’m not afraid of putting in some work. I wrote something that streamed mpegts over udp using libav and rkipc, in c, on a RV1103/1106.
But I do need to ask - is this SBC actually capable of doing 4k H265? Or is it something along the lines of “well, according to the datasheet… yeah, maybe, sometime in the future - but not supported right now.”?
EDIT: in the meantime, I’ve found several posts saying 4k camera + encoding used to work on 5.10 kernel. However, can’t find any image anywhere for my module.
@radxa I’d greatly appreciate any pointers or clarification you guys could give me.
Thank you kindly for your time!