ROCK 5A + Radxa 4k Camera Video Capture

Hello!
I’m using ROCK 5A with Radxa 4k camera, video preview looks great using the following gst-launch-1.0 command:
gst-launch-1.0 v4l2src device=/dev/video11 io-mode=4 ! videoconvert ! video/x-raw,format=NV12,width=1920,height=1080 ! xvimagesink

The issue is when I’m trying to capture video and save it as .mp4 file - Video comes out glitchy and cut off, the command I used is:
gst-launch-1.0 v4l2src num-buffers=512 device=/dev/video11 io-mode=4 ! videoconvert ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! mpegtsmux ! filesink location=/home/radxa/file.name.mp4

To me it looks like an encoding issue, I would love if someone can point me to the right direction regarding video encoding for v4l2 devices.

Got it figured out for anyone who encountered the same issue:
I was using ROCK 5A (Kernel 6.1): Radxa ROCK 5A Debian12 b3 instead of ROCK 5A (Kernel 5.10): Radxa ROCK 5A Debian11 b18

looks like the new kernel doesn’t fully support the Radxa 4k Camera just yet - which causes issue when queuing the different encoding methods used when capturing video into mp4 format.
Also, when using the new kernel and updating+upgrading the system using apt - the captured stream turns very dark - which is an issue that comes up with this v4l2 camera.

1 Like