Hi all,
I’m trying to use the camera feed from my Jetson Nano in 2 applications at the same time, through the use of v4l2loopback
, but I’m having some issues.
I have created 2 v4l2 devices with v4l2loopback
, and can successfully run the producer pipeline:
PRODUCER:
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=(fraction)30/1' ! nvvidconv ! tee name=t ! queue ! v4l2sink device=/dev/video1 t. ! queue ! v4l2sink device=/dev/video2
I have successfully created an OpenCV application that uses /dev/video1, so that’s not an issue…
But when I try to view /dev/video2 with the below pipeline, it crashes after displaying the first frame
CONSUMER:
gst-launch-1.0 v4l2src device=/dev/video2 ! xvimagesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate a buffer
Additional debug info:
gstv4l2src.c(998): gst_v4l2src_create (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0
Execution ended after 0:00:00.420358169
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …
If I replace the producer with videotestsrc
like so, the exact same error happens:
gst-launch-1.0 videotestsrc ! tee name=t ! queue ! v4l2sink device=/dev/video1 t. ! queue ! v4l2sink device=/dev/video2
Anyone have any idea how to fix this buffer issue?