I’m using opencv to create frames which I want to send to a v4l2sink via VideoWriter. This is what I have so far:
gst_out = "appsrc ! queue ! videoconvert ! v4l2sink device=/dev/video3" vw = cv2.VideoWriter(gst_out, cv2.CAP_GSTREAMER, 0, 60, (2560, 720)) while True: # Create sample opencv frame frame = np.zeros((2560,720,3), np.uint8) cv2.putText(frame, "room a", (500, 500), font, 1.0, (255, 255, 255), 1) vw.write(frame)
But when I try to view these frames via the following pipeline:
gst-launch-1.0 v4l2src device=/dev/video3 ! xvimagesink
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Cannot identify device '/dev/video3'.
Additionally, it doesn’t list this new video device in
In the python script I get the following error:
handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2sink0 reported: Cannot identify device '/dev/video3'.
I believe that maybe I didn’t install v4l2loopback correctly? I just ran
sudo apt-get install v4l2loopback-dkms and it installed with no errors