Jetson Nano only support streaming on two cameras

Hi

I fixed the camera frame rate issue. It was a bad value being written to a camera register.

Here I test each camera individually. Each camera works individually.

admin@nano-generic:~$ gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=1 num-buffers=300 ! fakesink
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 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 1
   Camera mode  = 0
   Output Stream W = 1920 H = 1080
   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.
Got EOS from element "pipeline0".
Execution ended after 0:00:14.079304048
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...
admin@nano-generic:~$ gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=2 num-buffers=300 ! fakesink
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 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 2
   Camera mode  = 0
   Output Stream W = 1920 H = 1080
   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.
Got EOS from element "pipeline0".
Execution ended after 0:00:12.858077955
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...

admin@nano-generic:~$ sudo gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=0 num-buffers=300 ! fakesink
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 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 0
   Output Stream W = 1920 H = 1080
   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.
Got EOS from element "pipeline0".
Execution ended after 0:00:12.748549271
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...

Next I tested frame rate for each camera. I don’t get exactly 30 fps, I have noticed the same using imx219.

admin@nano-generic:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=300
<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.67 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.68 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.68 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<
admin@nano-generic:~$ v4l2-ctl -d /dev/video1 --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=300
<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<
admin@nano-generic:~$ v4l2-ctl -d /dev/video2 --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=300
<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.68 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.68 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<< 27.69 fps
<<<<<<<<<<<<<<<<<<<<<<

I then tested the command provided by @DaneLLL for 1920 by 1080. Here the first camera works but the other two camera do not.

admin@nano-generic:~$ gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=0 num-buffers=300 ! fakesink & gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=1 num-buffers=300 ! fakesink & gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=2 num-buffers=300 ! fakesink &
[1] 5341
[2] 5342
[3] 5343
admin@nano-generic:~$ Setting pipeline to PAUSED ...
Setting pipeline to PAUSED ...
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is live and does not need PREROLL ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
Setting pipeline to PLAYING ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
New clock: GstSystemClock
New clock: GstSystemClock
GST_ARGUS: Creating output stream
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
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: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 2 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
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: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 1 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1080 
   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.
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
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: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1080 
   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.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: Done Success
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: Done Success
Got EOS from element "pipeline0".
Execution ended after 0:00:04.012817686
Setting pipeline to NULL ...
Got EOS from element "pipeline0".
Execution ended after 0:00:04.012868417
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
GST_ARGUS: Cleaning up
GST_ARGUS: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...
CONSUMER: ERROR OCCURRED
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: TIMEOUT
Additional debug info:
Argus Error Status
Execution ended after 0:00:11.032451983
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
(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)
Freeing pipeline ...
(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 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 2 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
(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)
Freeing pipeline ...
(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 4 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)

[1]   Done                    gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=0 num-buffers=300 ! fakesink
[2]-  Done                    gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=1 num-buffers=300 ! fakesink
[3]+  Exit 1                  gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=2 num-buffers=300 ! fakesink

I then tested if introducing a delay between when each camera getting started would make a difference. I can then get all the cameras streaming at the same time.

admin@nano-generic:~$ gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=0 num-buffers=1000 ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! videoconvert ! omxh264enc ! qtmux ! filesink location=vid0.mp4 -e & sleep 16 && gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=1 num-buffers=1000 ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! videoconvert ! omxh264enc ! qtmux ! filesink location=vid1.mp4 -e & sleep 32 && gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=2 num-buffers=1000 ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! videoconvert ! omxh264enc ! qtmux ! filesink location=vid2.mp4 -e &
[1] 84547
[2] 84548
[3] 84550
admin@nano-generic:~$ Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 40
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
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: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 0
   Output Stream W = 1920 H = 1080
   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.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 40
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
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: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 1
   Camera mode  = 0
   Output Stream W = 1920 H = 1080
   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.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 40
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
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: 640 x 480 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

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

GST_ARGUS: Running with following settings:
   Camera index = 2
   Camera mode  = 0
   Output Stream W = 1920 H = 1080
   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.
Got EOS from element "pipeline0".
Execution ended after 0:00:41.278712658
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...
Got EOS from element "pipeline0".
Execution ended after 0:00:39.811390814
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...
Got EOS from element "pipeline0".
Execution ended after 0:00:44.244313830
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...

[1]   Done                    sudo gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=0 num-buffers=1000 ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! videoconvert ! omxh264enc ! qtmux ! filesink location=vid0.mp4 -e
[2]-  Done                    sleep 16 && sudo gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=1 num-buffers=1000 ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! videoconvert ! omxh264enc ! qtmux ! filesink location=vid1.mp4 -e
[3]+  Done                    sleep 32 && sudo gst-launch-1.0 nvarguscamerasrc sensor-mode=0 sensor-id=2 num-buffers=1000 ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! videoconvert ! omxh264enc ! qtmux ! filesink location=vid2.mp4 -e

I have attached an image showing three cameras working. I am going to investigate why the delay seem to “solve” the problem.*Purple is from no IR filter