<div dir="ltr"><div><div><div><div><div><div>Hi guys,<br><br></div>I'm trying to capture video from software/virtual camera in Wndows7 (64 bit if it makes sense) using ksvideosrc but faced an issue. I have got GStreamer 1.6.0 and ManyCam (<a href="https://manycam.com/">https://manycam.com/</a>) as "virtual" camera. My test pipeline and result output is like below:<br><br><i>gst-launch-1.0.exe -v ksvideosrc device-index=1 ! videoconvert ! autovideosink<br>Setting pipeline to PAUSED ...<br>Pipeline is live and does not need PREROLL ...<br>ERROR: from element /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0: Internal data flow error.<br>Additional debug info:<br>gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0:<br>streaming task paused, reason not-negotiated (-4)<br>ERROR: pipeline doesn't want to preroll.<br>Setting pipeline to PAUSED ...<br>Setting pipeline to READY ...<br>Setting pipeline to NULL ...<br>Freeing pipeline ...</i><br><br>With debug logs for ksvideosrc I see that the gst_ks_video_src_set_caps() function returns 0 indicating that caps setting failed for some reason (if I read code right).<br><br><i>gst-launch-1.0.exe -q ksvideosrc device-index=1 ! videoconvert ! autovideosink<br>0:00:00.170741390  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideosrc.c:436:gst_ks_video_src_open_device:<ksvideosrc0> device 0: name='USB Camera' path='\\?\usb#vid_0c45&pid_62f1&mi_00#6&21e90d16&0&0000#{6994ad05-93ef-11d0-a3c<br>c-00a0c9223196}\global'<br>0:00:00.177066690  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideosrc.c:436:gst_ks_video_src_open_device:<ksvideosrc0> device 1: name='ManyCam Virtual Webcam' path='\\?\root#image#0000#{6994ad05-93ef-11d0-a3cc-00a0c9223196}\gl<br>obal'<br>0:00:00.181950133  2160 00000000029C6600 WARN              ksvideosrc gstksvideosrc.c:464:gst_ks_video_src_open_device:<ksvideosrc0> failed to create/open KsClock<br>0:00:00.185082158  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideodevice.c:344:gst_ks_video_device_dump_supported_property_sets: filter supports 4 property sets<br>0:00:00.188850852  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideodevice.c:348:gst_ks_video_device_dump_supported_property_sets: [0] KSPROPSETID_VIDCAP_VIDEOPROCAMP<br>0:00:00.192849978  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideodevice.c:348:gst_ks_video_device_dump_supported_property_sets: [1] KSPROPSETID_VIDCAP_VIDEOCONTROL<br>0:00:00.197922799  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideodevice.c:348:gst_ks_video_device_dump_supported_property_sets: [2] KSPROPSETID_VIDCAP_VIDEODECODER<br>0:00:00.202691688  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideodevice.c:348:gst_ks_video_device_dump_supported_property_sets: [3] KSPROPSETID_VIDCAP_VIDEOCOMPRESSION<br>0:00:00.207334435  2160 00000000029C6600 DEBUG             ksvideosrc ksvideohelpers.c:418:ks_video_probe_filter_for_caps: pin_count = 1<br>0:00:00.210116176  2160 00000000029C6600 DEBUG             ksvideosrc ksvideohelpers.c:437:ks_video_probe_filter_for_caps: pin[0]: pin_comm=3, pin_flow=2<br>0:00:00.213616032  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideodevice.c:415:gst_ks_video_device_open: pin[0]: found media type: video/x-raw, format=(string)RGBx, width=(int)[ 160, 1920 ], height=(int)[ 120, 1440 ], framerat<br>e=(fraction)[ 0/1, 60/1 ], pixel-aspect-ratio=(fraction)1/1<br>0:00:00.228354760  2160 00000000029C6600 DEBUG             ksvideosrc gstksvideodevice.c:415:gst_ks_video_device_open: pin[0]: found media type: video/x-raw, format=(string)RGBx, width=(int)[ 160, 320 ], height=(int)[ 120, 240 ], framerate=<br>(fraction)[ 0/1, 60/1 ], pixel-aspect-ratio=(fraction)1/1<br>0:00:00.248404687  2160 00000000029CE240 DEBUG             ksvideosrc gstksvideosrc.c:803:gst_ks_video_src_unlock_stop:<ksvideosrc0> gst_ks_video_src_unlock_stop<br>0:00:00.248566254  2160 00000000029C6640 DEBUG             ksvideosrc gstksvideosrc.c:726:gst_ks_video_src_set_caps: Result is 0<br>ERROR: from element /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0: Internal data flow error.<br>Additional debug info:<br>gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0:<br>streaming task paused, reason not-negotiated (-4)<br>0:00:00.308858400  2160 00000000029CE240 DEBUG             ksvideosrc gstksvideosrc.c:791:gst_ks_video_src_unlock:<ksvideosrc0> gst_ks_video_src_unlock<br>0:00:00.325522363  2160 00000000029CE240 DEBUG             ksvideosrc gstksvideosrc.c:791:gst_ks_video_src_unlock:<ksvideosrc0> gst_ks_video_src_unlock<br>0:00:00.330988839  2160 00000000029CE240 DEBUG             ksvideosrc gstksvideosrc.c:803:gst_ks_video_src_unlock_stop:<ksvideosrc0> gst_ks_video_src_unlock_stop</i><br><br></div>I have tried to set caps explicitly but with no success.<br><br><i>d:\gstreamer-1.6.1-64\1.0\x86_64\bin>gst-launch-1.0.exe -v ksvideosrc device-index=1 ! video/x-raw, format=RGBx, width=320, heigh=240, framerate=30/1, pixel-aspect-ratio=1/1 ! videoconvert ! autovideosink<br>Setting pipeline to PAUSED ...<br>Pipeline is live and does not need PREROLL ...<br>ERROR: from element /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0: Internal data flow error.<br>Additional debug info:<br>gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0:<br>streaming task paused, reason not-negotiated (-4)<br>ERROR: pipeline doesn't want to preroll.<br>Setting pipeline to PAUSED ...<br>Setting pipeline to READY ...<br>Setting pipeline to NULL ...<br>Freeing pipeline ...</i><br><br></div>At the same time I can capture video from real USB camera with no issues.<br><br><i>gst-launch-1.0.exe -v ksvideosrc device-index=0 ! video/x-raw, format=YUY2, width=320, heigh=240, framerate=30/1, pixel-aspect-ratio=1/1 ! videoconvert ! autovideosink<br>Setting pipeline to PAUSED ...<br>Pipeline is live and does not need PREROLL ...<br>Setting pipeline to PLAYING ...<br>New clock: GstSystemClock<br>/GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ heigh\=\(int\)240"<br>/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ heigh\=\(int\)240"<br>/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ heigh\=\(int\)240"<br>/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ heigh\=\(int\)240"<br>/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstD3DVideoSink:autovideosink0-actual-sink-d3dvideo.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ heigh\=\(int\)240"<br>/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ heigh\=\(int\)240"<br>/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ heigh\=\(int\)240"<br>/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ heigh\=\(int\)240"<br>ERROR: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstD3DVideoSink:autovideosink0-actual-sink-d3dvideo: Output window was closed<br>Additional debug info:<br>d3dhelpers.c(1851): d3d_render_buffer (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstD3DVideoSink:autovideosink0-actual-sink-d3dvideo<br>Execution ended after 0:00:07.170325221<br>Setting pipeline to PAUSED ...<br>Setting pipeline to READY ...<br>Setting pipeline to NULL ...<br>Freeing pipeline ...</i><br><br></div>Can you guys help me with this, please?<br><br></div>Thanks,<br></div>Oleg<br></div>