GStreamer pipeline for v4l2 access of on-board CSI camera

I understand from the release notes (of L4T R24.2/R24.2.1) that the on-board CSI camera now supports v4l2 interface. But, I am not able to capture video from the camera using v4l2. Please provide a Gstreamer sample pipeline for the same.

hello SagarGaonkar,

please refer to gstreamer user guide for examples. thanks
https://developer.nvidia.com/embedded/dlc/l4t-accelerated-gstreamer-guide-24-2-1

Hi JerryChang,

The Gstreamer user guide does not provide sample pipeline for v4l2 access of on-board CSI camera. It only has pipeline for USB camera and nvgstcapture-1.0 application for on-board CSI camera.

hello SagarGaonkar,

are you using v4l2src for your gstreamer pipeline?
if yes, please test with the following command.
thanks

gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-bayer,width=1920,height=1080 ! bayer2rgb ! videoconvert ! fbdevsink

Hi JerryChang,

Yes I intend to v4l2src.
I tried using the command you gave, but it did not work. I got following message:
“WARNING: erroneous pipeline: no element “bayer2rgb””

Do I need to install ‘bayer2rgb’ plugin separately? If Yes, Please guide me on doing this.
Thanks in advance.

hello SagarGaonkar,

sorry for late reply.
i had confirm this internally that we do not support gstreamer pipeline of v4l2src for CSI camera.
the nvcamerasrc is the only supported gstreamer component for CSI camera.

there’s v4l2-ctl tool you could access CSI camera.
share the commands as below. thanks

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw