Hello,
So I have this pipeline to merge two videos
gst-launch-1.0 nvcompositor name=comp \
sink_0::width=1920 sink_0::height=1080 \
sink_1::xpos=1280 sink_1::width=640 sink_1::height=480 \
! nv3dsink \
v4l2src device=/dev/video0 io-mode=2 ! 'video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA,width=1600,height=900' ! comp. \
videotestsrc pattern=0 ! 'video/x-raw,format=YUY2,width=640,height=480,framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! comp. -e
While I am able to display the result in nv3dsink, I cannot make the pipeline work in Python/OpenCV
As I know OpenCV requires the pipeline to use appsink so I changed the pipeline accordingly
gst-launch-1.0 nvcompositor name=comp \
sink_0::width=1920 sink_0::height=1080 \
sink_1::xpos=1280 sink_1::width=640 sink_1::height=480 \
! nvvidconv ! 'video/x-raw,format=BGRx' ! queue ! videoconvert ! queue ! xvimagesink \
v4l2src device=/dev/video0 io-mode=2 ! 'video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA,width=1600,height=900' ! comp. \
videotestsrc pattern=0 ! 'video/x-raw,format=YUY2,width=640,height=480,framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! comp. -e
I get an error could not link nvvconv1 to comp, comp can’t handle caps video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)1600, height=(int)900
How do I make it work ?