Gstreamer cause display strip and argus daemon high cpu load

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3864,height=2180,format=NV12' ! nvoverlaysink overlay-w=960 overlay-h=540

Below command display without error, But cpu load still over 100%

gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink

SDK version :32.5.0

hello felixch,

you’ll need to add video converter to downscale the resolution,
here’s one sample pipeline for your reference,
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! "video/x-raw(memory:NVMM), format=I420, width=960, height=540, framerate=30/1" ! nvoverlaysink overlay=0 overlay-x=0 overlay-y=0 overlay-w=960 overlay-h=540

Thanks for help!

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! "video/x-raw(memory:NVMM), format=I420, width=960, height=540, framerate=30/1" ! nvoverlaysink overlay=0 overlay-x=0 overlay-y=0 overlay-w=960 overlay-h=540

Output like this:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3864 x 2180 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 0.300000, max 72.000000; Exposure Range min 74000, max 33300000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 3864 H = 2180 
   seconds to Run    = 0 
   Frame Rate = 29.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:01.154094410
Setting pipeline to PAUSED ...
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
Setting pipeline to READY ...
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
CONSUMER: Done Success
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552 

hello felixch,

it’s rendering issue with nvoverlaysink, please have a try to execute below to stop gdm then enable the gst-pipeline again for testing,
for example,
$ sudo systemctl stop gdm
$ sudo loginctl terminate-seat seat0
$ gst-launch-1.0 nvarguscamerasrc ...

Thank you!

It works for this pipeline

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! "video/x-raw(memory:NVMM), format=I420, width=960, height=540, framerate=30/1" ! nvoverlaysink overlay=0 overlay-x=0 overlay-y=0 overlay-w=960 overlay-h=540

But argus-daemon cpu load up to 150%, and gst-launch up to 40%. Is this correct?

Desktop gone after gdm down, how to fix it?

hello felixch,

I assume you’re using top utility to measure the CPU usage, right?
please using top commands and switch Irix mode to off by “I” (shift+i) to check the CPU usage in average.

may I also know what’s the actual use-case to render the specific region for camera preview frames?
you should be able to render the preview to an HDMI screen without configure overlay regions with gdm.
such as… $ gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)30/1' ! nvoverlaysink -e

Irix mode just set 4 cores cpu load scale to 400%.
Switch it off set the scale to 100%, just different way for display.

150% mean argus-daemon takes one and half cpu core,
Just want to confirm is it a reasonable value for 4k sensor.

The argus-daemon in another project only take 25% load for 2k sensor.

hello felixch,

please check developer guide with CSI and USB Camera Features, the image resolution is validated up to 3280x2464, and the frame-rate is 21-fps.
it’s camera application and EGL streams consume CPU resources, mostly CPU usage was taken by argus_camera application due to buffer transmit. besides, camera pipeline still need CPU to run lots of algorithms like 3A.
so, you may try enable AELock and reduce the frame-rate if would like to reduce the CPU usage.

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