Hi there,

I’m trying to get the jetson-multicamera-pipelines examples up and running on my Jetson system:

  • JetPack 5.1.1
  • Ubuntu 20.04
  • Python 3.8
  • GStreamer 1.16.3
  • GST-Python 1.16.2
  • DeepStream 6.3

To run the examples, I’m using a Jetson Containers build including deepstream.

Issue

When I attempt to create a CameraPipeline() instance, I get the following error:

from jetmulticam import CameraPipeline
 
cameras = [1, 3, 4, 6]  # the system has 4x stereo GMSL cameras connected
p = CameraPipeline(cameras)
Traceback (most recent call last):
  File "as_proto.py", line 6, in <module>
    p = CameraPipeline(cameras)
  File "/repositories/jetson-multicamera-pipelines/jetmulticam/pipelines/multicam.py", line 63, in __init__
    super().__init__(**kwargs)
  File "/repositories/jetson-multicamera-pipelines/jetmulticam/pipelines/basepipeline.py", line 25, in __init__
    self._p = self._create_pipeline(**kwargs)
  File "/repositories/jetson-multicamera-pipelines/jetmulticam/pipelines/multicam.py", line 68, in _create_pipeline
    cameras = [
  File "/repositories/jetson-multicamera-pipelines/jetmulticam/pipelines/multicam.py", line 69, in <listcomp>
    make_argus_camera_configured(c, bufapi_version=0) for c in self._cams
  File "/repositories/jetson-multicamera-pipelines/jetmulticam/bins/cameras.py", line 18, in make_argus_camera_configured
    cam.set_property("bufapi-version", bufapi_version)
TypeError: object of type `GstNvArgusCameraSrc' does not have property `bufapi-version'

I’ve seen a few comments saying the bufapi-version is no longer needed, so I tried commenting it out. It seems that the camera streams get created, but after a moment an gstnvarguscamerasrc error appears for each stream:

<__gi__.GstNvArgusCameraSrc object at 0xffffa4421840 (GstNvArgusCameraSrc at 0x25d0de20)> <__gi__.Gstnvvconv object at 0xffffa4421c00 (Gstnvvconv at 0x25d171f0)>
<__gi__.GstNvArgusCameraSrc object at 0xffffa4421880 (GstNvArgusCameraSrc at 0x25d0e530)> <__gi__.Gstnvvconv object at 0xffffa4421c40 (Gstnvvconv at 0x25d178f0)>
<__gi__.GstNvArgusCameraSrc object at 0xffffa44218c0 (GstNvArgusCameraSrc at 0x25d0ecb0)> <__gi__.Gstnvvconv object at 0xffffa4421c80 (Gstnvvconv at 0x25d17f50)>
<__gi__.GstNvArgusCameraSrc object at 0xffffa4421900 (GstNvArgusCameraSrc at 0x25d0f450)> <__gi__.Gstnvvconv object at 0xffffa4421cc0 (Gstnvvconv at 0x25d18710)>
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
GST_ARGUS: Creating output stream
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
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.000000, max 16.000000; Exposure Range min 28000, max 33000000;

GST_ARGUS: 960 x 600 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 16000000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 33000000;

GST_ARGUS: Running with following settings:
   Camera index = 4 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Available Sensor modes :
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
GST_ARGUS: 1920 x 1200 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 33000000;

GST_ARGUS: 960 x 600 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 16000000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 33000000;

GST_ARGUS: Running with following settings:
   Camera index = 3 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
CONSUMER: Producer has connected; continuing.
GST_ARGUS: Available Sensor modes :
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
GST_ARGUS: 1920 x 1200 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 33000000;

CONSUMER: Producer has connected; continuing.
GST_ARGUS: 960 x 600 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 16000000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 33000000;

GST_ARGUS: Running with following settings:
   Camera index = 1 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Available Sensor modes :
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
GST_ARGUS: 1920 x 1200 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 33000000;

CONSUMER: Producer has connected; continuing.
GST_ARGUS: 960 x 600 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 16000000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 33000000;

GST_ARGUS: Running with following settings:
   Camera index = 6 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   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.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)

I believe my system versioning for the key packages is correct - if anyone has any suggestions or advice for what could be causing the error I’d really appreciate it.

Thanks!

Hi,

Could you share which container you are using so we can give it a quick check?
Thanks.

@AastaLLL thanks for responding so quickly!

The container I’m using is:

cd jetson-containers
./build.sh pytorch torchvision tensorrt torch2trt zed deepstream

Hi,

Thanks.
Let us discuss this internally and update you later.

Hi,
It looks like camera sources are not stable. Please try single camera, two cameras and three cameras. To see if it works in the conditions.

@AastaLLL @DaneLLL

Thank you for the update.

One camera

When running with just one camera, I can grab images fine with the following script:

import time
from jetmulticam import CameraPipeline
 
cameras = [1]
p = CameraPipeline(cameras)

while True:
    for idx in cameras:
        img = p.read(cameras.index(idx))
        if img is None: 
            continue
        print(idx, img.shape, time.time())
    time.sleep(1/10)

Two (or more) cameras

However, if I use two cameras by changing:

cameras = [1]

to:

cameras = [1, 3]

the nvbuf_utils: dmabuf_fd -1 mapped entry NOT found occurs immediately when p = CameraPipeline(cameras) is called.

Extra Information

For extra information:

  • When using two cameras, the script for reading images (above) continues to work for one of the cameras. Sometimes sensor 1 works, while sometimes sensor 3 works. In between I’m running:

    systemctl restart nvargus-daemon.service
    

    to ensure the interfaces are reset.

  • When using three or more cameras, the nvbuf_utils error appears for each camera, and it’s not possible to grab any images.

Hi,
In some condition, the print is shown when there is no frames from the camera source, so it is very likely the cameras are not stable. You may try the gst-launch-1.0 command and see if the issue is present:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! fakesink nvarguscamerasrc sensor-id=1 ! fakesink nvarguscamerasrc sensor-id=2 ! fakesink nvarguscamerasrc sensor-id=3 ! fakesink

If the issue is present in both gst-launch-1.0 command and using CameraPipeline, would suggest check the sensor driver to improve stability.

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