I have 2 gstreamer commands in 2 system services that works fine at the beginning for serveral hours, but it always crash loopback after 4-7 hours, my commands are:
gst-launch-1.0 nvarguscamerasrc sensor-id="$vis" ! \
'video/x-raw(memory:NVMM), width=1280, height=720, format=NV12, framerate=30/1' ! \
nvvidconv flip-method=0 ! \
'video/x-raw, width=1280, height=720, format=BGRx' ! \
queue ! videoconvert ! \
'video/x-raw, format=BGR' ! \
tee name=t ! \
queue ! v4l2sink device=/dev/video6 t. ! \
queue ! v4l2sink device=/dev/video7
gst-launch-1.0 v4l2src device="/dev/video$ir" ! videoconvert ! tee name=t ! queue ! v4l2sink device=/dev/video8 t. ! queue ! v4l2sink device=/dev/video9
/dev/video6,7,8,9 are virtual videos created by v4l2loopback, errors are:
For first service:
Oct 15 21:35:43 tegra-ubuntu nvargus-daemon[1103]: === gst-launch-1.0[91674]: CameraProvider destroyed (0xffff50000df0)=== gst-launch-1.0[91674]: Connection closed (FFFF551EC900)=== gst-launch-1.0[91674]: Connection cleaned up (FFFF551EC900)=== gst-launch-1.0[91696]: Connection established (FFFF551EC900)=== gst-launch-1.0[91696]: CameraProvider initialized (0xffff50000c20)(Argus) Error AlreadyAllocated: Device 0 (of 1) is in use (in src/api/CameraProviderImpl.cpp, function createCaptureSessionInternal(), line 272)
Oct 15 21:35:43 tegra-ubuntu start-virtual-video[91696]: Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:762 Failed to create CaptureSession
For second service:
163]: Setting pipeline to PAUSED ...
163]: Pipeline is live and does not need PREROLL ...
163]: Setting pipeline to PLAYING ...
163]: New clock: GstSystemClock
163]: ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
163]: Additional debug info:
163]: gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
163]: streaming stopped, reason not-negotiated (-4)
163]: Execution ended after 0:00:00.000900954
163]: Setting pipeline to NULL ...
163]: Freeing pipeline ...
service: Main process exited, code=exited, status=1/FAILURE
FYI, I use those 4 virtual devices in docker container with privileged mode, and those commands works fine in Jetson Nano