10_argus_camera_recording couldn't work as expect

Hi Guys,

I am trying out the 10_camera_recording sample code in Tegra multimedia API.
env: jetson orin nx, jetpack 35.4.1,.
I did not change anything on the 10_argus_camera_recording.
just run below command:

  1. sudo make
desktop:/usr/src/jetson_multimedia_api/samples/10_argus_camera_recording$ sudo make
Compiling: main.cpp
make[1]: Entering directory '/usr/src/jetson_multimedia_api/samples/common/classes'
Compiling: NvUtils.cpp
Compiling: NvElementProfiler.cpp
Compiling: NvElement.cpp
Compiling: NvApplicationProfiler.cpp
Compiling: NvVideoDecoder.cpp
Compiling: NvJpegEncoder.cpp
Compiling: NvBuffer.cpp
Compiling: NvLogging.cpp
Compiling: NvEglRenderer.cpp
Compiling: NvBufSurface.cpp
Compiling: NvDrmRenderer.cpp
Compiling: NvJpegDecoder.cpp
Compiling: NvVideoEncoder.cpp
Compiling: NvV4l2ElementPlane.cpp
Compiling: NvVulkanRenderer.cpp
Compiling: NvV4l2Element.cpp
make[1]: Leaving directory '/usr/src/jetson_multimedia_api/samples/common/classes'
Compiling: /usr/src/jetson_multimedia_api/argus/samples/utils/Thread.cpp
Compiling: /usr/src/jetson_multimedia_api/argus/samples/utils/NativeBuffer.cpp
Compiling: /usr/src/jetson_multimedia_api/argus/samples/utils/nvmmapi/NvNativeBuffer.cpp
Linking: argus_camera_recording
  1. ./argus_camera_recording -v -c -s -d 10
desktop:/usr/src/jetson_multimedia_api/samples/10_argus_camera_recording$ ./argus_camera_recording -v -c  -s -d 10
Set governor to performance before enabling profiler
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 4
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
create video encoder return true
H264: Profile = 100, Level = 50
NVMEDIA: Need to set EMC bandwidth : 126000
PRODUCER: Starting repeat capture requests.
NvVideo: bBlitMode is set to TRUE
CONSUMER: Released frame. 23
CONSUMER: Acquired Frame. 28
Error generated. main.cpp, threadExecute:327 Failed to get NvBufSurface from dmabuf_fd
Error generated. /usr/src/jetson_multimedia_api/argus/samples/utils/Thread.cpp, threadFunction:132 (propagating)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
PRODUCER: Done -- exiting.
[ERROR] (NvV4l2ElementPlane.cpp:178) <enc0> Capture Plane:Error while DQing buffer: Broken pipe
[ERROR] (NvV4l2ElementPlane.cpp:178) <enc0> Capture Plane:Error while DQing buffer: Broken pipe
[ERROR] (NvV4l2ElementPlane.cpp:256) <enc0> Capture Plane:Error while Qing buffer: Device or resource busy
Error generated. main.cpp, encoderCapturePlaneDqCallback:505 Failed to enqueue buffer to encoder capture plane
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Argus client is exiting with 3 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)
************************************
Total Profiling Time = 0 sec

Hi,
Please check if camera source is good. Please run the command and see if camera preview is shown:

DISPLAY=:0 gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! video/x-raw,format=I420 ! xvimagesink sync=0

DISPLAY=:0 gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! video/x-raw,format=I420 ! xvimagesink sync=0

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: 1920 x 1200 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.122018, max 6.309574; Exposure Range min 28000, max 22000000;

GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 0
   Output Stream W = 1920 H = 1200
   seconds to Run    = 0
   Frame Rate = 59.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.

The camera works well, but the problem I mentioned is still here.

Hi,
Please check if you install the samples through SDKManager or apt-get install command. Sometimes the issue is due to mismatch of samples and Jetpack version.

And please try 09_argus_camera_jpeg sample. Or can try gstreamer command.

I run the commands below.

sudo apt-get install nvidia-l4t-jetson-multimedia-api
cd /usr/src/jetson_multimedia_api/argus/
sudo apt-get install cmake build-essential pkg-config libx11-dev libgtk-3-dev libexpat1-dev libjpeg-dev libgstreamer1.0-dev
sudo mkdir build && cd build
then
sudo cmake ..
sudo make -j8
sudo make install

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