Using nvgstcapture results in either laggy system or crash

Hi.
I am trying to get the camera working, but nothing is working as it should.
The Nano is running Jetpack 4.6.4 with packages all up to date.
So i want to use the full resolution of the IMX219 sensor to get max FOV and best image quality, which is AFAIK 3264x2464@21fps. At least that’s what nvgstcapture tells me.
But when i try to capture images at this resolution using simple_camera.py from this repository the CPU is at 100%, FPS are about 0.3 and the whole operating system is laggy. So not usable.
And when i use nvgstcapture -m 1 --image-res=5, nvgstcapture crashes with the following message:

GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

ARGUS_ERROR: Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute: 895 Frame Rate specified is greater than supported
GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 3264 H = 2464 
   seconds to Run    = 0 
   Frame Rate = 21.000000 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ARGUS_ERROR: Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute: 1131 InvalidState.
GST_ARGUS: Cleaning up
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: ERROR OCCURRED
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED

Which is even less usable.
I can’t imagine this is expected behavior, so i rebuilt OpenCV with CUDA support, but that didn’t help.
l4t-jetson-multimedia/-api/-utils are installed, coming from a full install using SDKManager.

Any help is much appreciated, thanks in advance.

Edit: OK, i was able to solve the latter problem by specifically setting the framerate to 21 via an argument, but i wonder why this is necessary in the first place, because the output says it is running at 21frames.
But the issue having extreme frame drops using CSICamera still persists.

The nvgstcapture set 30 as default framerate. You can download the source code to modify it.

1 Like

Thanks for your help.
Unfortunately, the issue with Python CSICamera objects persists, do you have an idea on that?
The callbacks do not correspond to 21 FPS and the frame time is very inconsistent ranging from 30-80ms.

I would suspect the camera have problem to capture frame data normally.

v4l2-ctl --set-fmt-video=width=3264,height=2464,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap

and

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)3264, height=(int)2464, framerate=(fraction)21/1' ! nvvidconv ! fpsdisplaysink video-sink=fakesink text-overlay=false -v

Both of these commands seem to be working fine. They output a frame rate of 21.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.