Gstreamer MIPI Camera with Xavier

The sample code given in Tegra Multi-media API for nvidia xavier comes with either capturing images for a single camera or just access multiple cameras. Is it possible to share sample codes, where you could use multiple cameras simultaneously or asynchronously to acquire images and store it on a drive or push it to OpenCV consumer?. I’m quite new to this platform and finding it difficult to understand the libargus rules.

I understood that you can also acquire images using GStreamer.
I have four MIPI cameras connected to NVIDIA Jetson Xavier through ECON system module. I acquire an image from the camera (sensor0) using GStreamer. I get the following error using GStreamer and don’t know where I’m going wrong.

gst-launch-1.0 nvarguscamerasrc sensor-id=0 !‘video/x-raw(memory:NVMM), width=(int)1920,height=(int)1080, format=(string)NV12’ ! nvoverlaysink -e

bash: !'video/x: event not found

If all you want to do is capture images and sometimes store them, from multiple cameras, it’s probably better to use the v4l2 interface (/dev/videoN) and open each camera separately and capture in a separate thread per camera. That would be pretty easy. There are reasonable Video4Linux2 image capture examples on the Internet; they don’t need to be Nano specific.

Hi skrishnamoorthi,

Additionally to what snarky said, I recommend using GStreamer even if your use case is simple. I advice taking a look into our GStreamer Daemon (gstd): https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Daemon_-_Building_GStreamer_Daemon which is basically gst-launch on steroids and it’s open source. Gstd allows to control multiple pipelines with fine-grained control which for your case, that involves controlling multiple cameras simultaneously or asynchronously, sounds a good fit.

Regarding the issue your reported in the pipeline, that error is due to gst-launch unable to parse correctly that pipeline as you entered it in the terminal, the same pipeline fixed is as follows (please note the space between the character “!” and 'video/x):

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)1920,height=(int)1080, format=(string)NV12' ! nvoverlaysink -e

Regards,

-Jafet

Thanks, snarky and jchaves.

Hi snarky and jchaves,
I tried your suggestions and ran into the problem of time complexity. The issue is posted in the below link. Can you please give your suggestions regarding this issue?

https://devtalk.nvidia.com/default/topic/1061535/jetson-agx-xavier/multi-cam-image-capturing-gstreamer-jetson-xavier/#reply