<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>If I want to send a video stream on /dev/video4 to a loopback
device in Ubuntu I can use :</p>
<p>./gst-launch-1.0 -v -m v4l2src device=/dev/video4 ! v4l2sink
device=/dev/video0 <br>
</p>
<p>And the video on /dev/video4 can be seen with :</p>
<p>ffplay /dev/video0</p>
<p>I can merge 2 videos with:</p>
<p> </p>
<pre class="western" style="margin-bottom: 0.5cm"><strong>./gst-launch-1.0 v4l2src device=/dev/video4 ! videoscale ! queue ! videoconvert ! video/x-raw, format=YUY2, framerate=30/1, width=640, height=480! alpha alpha=1 ! videobox border-alpha=0 left=-640 ! compositor name=Mix
! videoconvert ! autovideosink v4l2src device=/dev/video2 ! videoscale ! queue ! videoconvert ! video/x-raw, format=YUY2, framerate=30/1, width=640, height=480! alpha alpha=1 ! videobox border-alpha=0 right=-640 ! Mix.
And see the merged camera videos on my monitor but I can't seem to send those merged videos to a loopback device. For example if I try changing autovideosink to v4l2sink device=/dev/video0:
</strong><strong>
<strong>./gst-launch-1.0 v4l2src device=/dev/video4 ! videoscale ! videoconvert ! video/x-raw, format=YUY2, framerate=30/1, width=640, height=480! alpha alpha=1 ! videobox border-alpha=0 left=-640 ! videomixer name=Mix ! videoconvert
! </strong><strong>v</strong><strong><font face="Liberation Mono, monospace"><font style="font-size: 10pt" size="2"><b>4l2sink device=/dev/video0</b></font></font></strong><strong> sync=false v4l2src device=/dev/video2 ! videoscale ! videoconvert ! video/x-raw, format=YUY2, framerate=30/1, width=640, height=480! alpha alpha=1 ! videobox border-alpha=0 right=-640 ! Mix.
I get the following result with no video output:
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:v4l2src1: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src1:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.381495593
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
I have also tried not specifying a video format as I have in my first example above but get the same error. Does anyone know how I can send my merged stream to the loopback device?
Thanks
Jim
</strong> <style type="text/css">pre { background: transparent }
pre.western { font-family: "Liberation Mono", monospace; font-size: 10pt }
pre.cjk { font-family: "Noto Sans Mono CJK SC", monospace; font-size: 10pt }
pre.ctl { font-family: "Liberation Mono", monospace; font-size: 10pt }
p { margin-bottom: 0.25cm; line-height: 115%; background: transparent }
strong { font-weight: bold }</style><pre class="western" style="margin-bottom: 0.5cm"></pre></strong></pre>
<p>
<style type="text/css">
pre { background: transparent }
pre.western { font-family: "Liberation Mono", monospace; font-size: 10pt }
pre.cjk { font-family: "Noto Sans Mono CJK SC", monospace; font-size: 10pt }
pre.ctl { font-family: "Liberation Mono", monospace; font-size: 10pt }
p { margin-bottom: 0.25cm; line-height: 115%; background: transparent }
strong { font-weight: bold }</style></p>
</body>
</html>