Continuing the discussion from NvArgus Camera Issue with Xvfb and GStreamer.
I am integrating Connect Tech’s Photon NGX-003 board with ORIN NX (16GB) and e-Con Systems’ visible light camera eCAM80_CUNX/Starvis IMX415 for an AI Vision application. Our production system ships headless. The following two pipelines work fine when the Gnome desktop is enabled and active, and a computer display is physically connected to the board. They fail if the display is disconnected or if the desktop is stopped and disabled, and the system is restarted in non-graphical mode, and the unit is accessed from an Ubuntu desktop via ssh -Y <orin_host_name>
such that we can serve the remote X client requests with the local X server through ssh. Our Jetpack is 5.1.2.
gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 ! "video/x-raw(memory:NVMM), width=1280, height=720, framerate=10/1, format=(string)NV12" ! queue ! nvvidconv flip-method=0 ! "video/x-raw, format=(string)BGRx" ! videoconvert ! "video/x-raw, format=(string)BGR" ! nv3dsink -e
gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 ! "video/x-raw(memory:NVMM), width=1280, height=720, framerate=10/1, format=(string)NV12" ! queue ! nvvidconv flip-method=0 ! "video/x-raw, format=(string)BGRx" ! videoconvert ! "video/x-raw, format=(string)BGR" ! nveglglessink
The errors are, for the sink nv3dsink
:
libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate
Setting pipeline to PAUSED ...
libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 155 ()
Minor opcode of failed request: 1
Serial number of failed request: 20
Current serial number in output stream: 20
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)
For the nveglglessink
sink:
libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate
Setting pipeline to PAUSED ...
Using winsys: x11
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
(Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function initialize(), line 89)
(Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function create(), line 44)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadInitialize:320 Failed to create FrameConsumer
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:241 (propagating)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, waitRunning:203 Invalid thread state 3
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:806 (propagating)
Got EOS from element "pipeline0".
Execution ended after 0:00:00.117963862
Setting pipeline to NULL ...
Freeing pipeline ...
(gst-launch-1.0:124008): GStreamer-WARNING **: 18:35:14.699: The default memory allocator was freed!
(gst-launch-1.0:124008): GStreamer-CRITICAL **: 18:35:14.700: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed
We have used the virtual X server Xvfb
for years to support our non-GUI C++ analytics application without issues in a headless environment. The GStreamer pipelines cannot use Xvfb
, we noticed the XServer installed via gdm3 has at least two extensions: NV_CONTROL
and NV_GLX
that Xvfb
does not have. I don’t know anything about these extensions.
This is the first time in years that we have faced difficulties capturing video from a camera in a headless system or when the desktop is enabled but the Display is not physically connected.
Is this a requirement of the Argus source plugin nvarguscamerasrc
?
Any ideas on how to make this work for us will be greatly appreciated.