I want to write 4 channel video frames using videowriter
gst_out = "appsrc ! queue ! videoconvert ! videoscale method=0 ! xvimagesink" vw = cv2.VideoWriter(gst_out, cv2.CAP_GSTREAMER, 0, 60, (2560, 720)) img = np.zeros((720,2560,4), dtype=np.uint8) while True: vw.write(img)
But I get the following error:
[ WARN:0] global /tmp/build_opencv/opencv/modules/videoio/src/cap_gstreamer.cpp (1631) writeFrame OpenCV | GStreamer warning: cvWriteFrame() needs images with depth = IPL_DEPTH_8U and nChannels = 3.
Is it possible to write a 4 channel image? I want to do this so I can later use videocompositor and place the opencv frames over another video feed.