<div dir="ltr">Hi Sergio,<div><br></div><div>That worked great! Can you explain why I needed that? Doing a gst-inspect on the alpha element and the xvimagsink element, the xvimagesink component doesn't seem to specify any color spaces it can handle. What would I have needed to look at to know that I needed to add a videoconvert element between the alpha and xvimagesink?</div><div><br></div><div>Also this seems to be using a lot of CPU which seems to all be down to the alpha element. I assume this is normal?</div><div><br></div><div>Thanks for all your help,</div><div><br></div><div>Mike</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 May 2015 at 17:24, Sérgio Agostinho <span dir="ltr"><<a href="mailto:sergio.r.agostinho@gmail.com" target="_blank">sergio.r.agostinho@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mike, <div><br></div><div>Try placing a videoconvert between the alpha and xvimagesink element.</div><div><br></div><div><span class=""><div style="font-size:12.8000001907349px"><font face="monospace, monospace">gst-launch-1.0 v4l2src device=/dev/video0 ! queue ! \</font></div><div style="font-size:12.8000001907349px"><font face="monospace, monospace">    video/x-h264,width=1920,height=1080,framerate=30/1 ! \</font></div><div style="font-size:12.8000001907349px"><font face="monospace, monospace">    h264parse ! avdec_h264 ! alpha method=green ! \</font></div></span><div style="font-size:12.8000001907349px"><font face="monospace, monospace">    <b>videoconvert</b> ! xvimagesink sync=false</font></div></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Cheers</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-05-06 15:35 GMT+02:00 Michael Ditum <span dir="ltr"><<a href="mailto:mike@mikeditum.co.uk" target="_blank">mike@mikeditum.co.uk</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi,</div><div><br></div><div>I'm trying to put together a green screen application with my Logitech C910 WebCam on Fedora 21. I've managed to get 1080p30 h264 video from the webcam to be displayed with gstreamer using the following command:</div><div><br></div><div>gst-launch-1.0 v4l2src device=/dev/video0 ! queue ! \</div><div>    video/x-h264,width=1920,height=1080,framerate=30/1 ! \</div><div>    h264parse ! avdec_h264 ! xvimagesink sync=false</div><div><br></div><div>This is working great with nice and low latency. The next thing I want to do is Chroma Key-ing of the picture making certain colours transparent before I add an image / video behind the webcam picture. From what I've read I need to use the alpha filter to achieve this. From looking at gst-inspect I can see that it takes in video/x-raw and outputs video/x-raw. The avdec_h264 element outputs video/x-raw so it looks like I should be able to do:</div><div><br></div><div>gst-launch-1.0 v4l2src device=/dev/video0 ! queue ! \</div><div>    video/x-h264,width=1920,height=1080,framerate=30/1 ! \</div><div>    h264parse ! avdec_h264 ! alpha method=green ! \</div><div>    xvimagesink sync=false</div><div><br></div><div>However whenever I run that command I get the following output:</div><div><br></div><div>Setting pipeline to PAUSED ...</div><div>Pipeline is live and does not need PREROLL ...</div><div>Setting pipeline to PLAYING ...</div><div>New clock: GstSystemClock</div><div>Redistribute latency...</div><div>ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.</div><div>Additional debug info:</div><div>gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:</div><div>streaming task paused, reason not-negotiated (-4)</div><div>Execution ended after 0:00:<a href="tel:00.437613774" value="+437613774" target="_blank">00.437613774</a></div><div>Setting pipeline to PAUSED ...</div><div>Setting pipeline to READY ...</div><div>Setting pipeline to NULL ...</div><div>Freeing pipeline ...</div><div><br></div><div>Can anyone tell me what I'm missing and why this isn't working correctly?</div><div><br></div><div>Thanks in advance for any help,</div><div><br></div><div>Mike</div></div>
<br></div></div>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>