I have two USB 3.0 1080p ELP cameras that I am trying to use on my Xavier NX board. I’ve previously tried them with a Nano, and got an error that indicated that the board was running out of bandwidth (likely a problem with uvc video driver). This time, I am not getting this error, but a problem nevertheless occurs.
If I use gstreamer to open a stream, via gst-launch-1.0 v4l2src device=/dev/video0 ! xvimagesink, the first camera starts fine. The second stream however always shows a frozen screen with the contents of the desktop when I initiate it. If I close one of the gstreamer windows, the second one unfreezes and works normally. No error occurs, just the freeze, so I’m not sure what is causing this behavior.
If I use python and opencv, a single camera again works fine. However, when allocating for a second video capture, python gives the following error:
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
No video opens. This occurs at the second of the following two lines:
I have no idea whether this is related to the Nano’s problem of bandwidth being exceeded, or if it’s completely different. Would greatly appreciate any input.
Edit: I’ve accidentally created this post in the wrong branch. If possible, could an admin move this to the Xavier NX forum? Thank you.
Hi,
Please check if you can launch the camera by following the steps in Jetson Nano FAQ Q: I have a USB camera. How can I lauch it on Jetson Nano?
The steps are valid for all Jetson platforms. You may try and see if you can launch the two cameras through gst-launch-1.0 commands.
And you can execute sudo jetson_clocks to get max performance.
The first camera always opens fine, but the second one is frozen and freezes the first. Closing any of the open cameras unfreezes the remaining one. No error is generated.
Would suggest you check the steps in FAQ and set exact mode including width,height,format,framerate. And by default two CPUs are enabled. You can run sudo nvpmodel -m 2 to enable six CPUs for a try.
command. I can also confirm that one of my ELP USB 3.0 cameras does indeed open with this command alongside a second non-USB 3.0 camera, with both active at the same time. It is only a second ELP camera that freezes the screen. I have the Xavier NX in 6-core mode.
Could you point me to the specific FAQ you are referring to? I cannot seem to build a working pipeline aside from the default one with xvimagesink.
I can confirm that none of my cameras launch using the commands in that FAQ. The error given is always like this:
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Can I assume something is wrong with my cameras (keep in mind there are several kinds I’ve tested)? I made sure all the parameters are as supported by the cameras.
Hi, I noticed that too: the specifications on the camera say 50fps, but the v4l2-ctl utility gives 60. I tried both ways (including your exact command), both give the same error I mentioned above.
Edit: no, it works properly, I made a typo. However, opening a second camera still freezes the feed. No errors appear, just frozen cameras.