The second one is a tracking application that uses the following pipe for videoloading;
$“nvcamerasrc ! video/x-raw(memory:NVMM), format=(string)I420, width=640, height=480, framerate=30/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink”;
…but when these are run simultaneously we get the following error:
Setting pipeline to PAUSED …
Socket read error. Camera Daemon stopped functioning…
gst_nvcamera_open() failed ret=0
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0:
Failed to start
Setting pipeline to NULL …
Freeing pipeline …
We assume this is due to the fact that the camerasrc can only be used once. We would prefer using a tee, but haven’t yet found a good one. Any help would be greatly appreciated.
Now tracker and detector work together, but the implementation is somewhat unstable (it won’t always open). We get the following error only sometimes:
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/nvidia/opencv-3.4.0/modules/highgui/src/window.cpp, line 331
terminate called after throwing an instance of ‘cv::Exception’
what(): /home/nvidia/opencv-3.4.0/modules/highgui/src/window.cpp:331: error: (-215) size.width>0 && size.height>0 in function imshow
As well, when we run the tracker with the loopback it is lagging quite a bit. Is this because it skips frames or is there another reason for this?
The loopback provides even more latency to the system (it seems) so we tried to run an individual pipe at first:
I suppose it fixes a synchronization issue, but I have no details on that.
You cannot use the same capture node from 2 applications…This is the purpose of tee.
What you can try if you want both applications to be independent from each other is to create 2 virtual nodes. Be sure that nodes are not used by any application first and then: