Video Capture Source Filter

I have a several frame grabbers. I would like to open one of frame grabber over directshow source filter.

First of all is it possible?

I can open with ffmeg directly:

ffmpeg.exe -loglevel debug -f dshow -s 320x180 -r 24 -i video="@device_pnp_\\?\pci#ven_1c04&dev_0005&subsys_00111c04&rev_01#8&35e39093&0&000800080008#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{741e7ee4-7af1-4fce-a07b-a811af3b666d}" -c:v libx264 -an -profile:v baseline -pix_fmt yuv420p -preset veryfast -r 24 -s 320x180 -f mpegts udp:// 

But I need the frames… How can I open this filter in a c++ app?


probably not possible through OpenCV. it’s not made for this flexibility.

you should use ffmpeg’s APIs, or use Windows API directly.

I see, thanks so much!

your ffmpeg cmdline builds an udp server ?

you could try to reach that from
VideoCapture("udp://", CAP_FFMPEG);
(until you find a better solution…)

Thanks, the posted ffmpeg cmdline creates an udp server, but I want to avoid it, therefore more precisely what I need to open an Video Capture Source Filter directly, which I could open with ffmpeg:

-i video="@device_pnp_\\?\pci#ven_1c04&dev_0005&subsys_00111c04&rev_01#8&35e39093&0&000800080008#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{741e7ee4-7af1-4fce-a07b-a811af3b666d}"

but unfortunately these are not work:

VideoCapture("@device_pnp_\\?\pci#ven_1c04&dev_0005&subsys_00111c04&rev_01#8&35e39093&0&000800080008#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{741e7ee4-7af1-4fce-a07b-a811af3b666d}", CAP_FFMPEG);


VideoCapture("FrameGrabber X Channel", CAP_DSHOW);

sure, that is terribly clumsy …

yep, CAP_FFMPEG does not accept “pipeline strings” and CAP_DSHOW does not use “device strings”

CAP_GSTREAMER supports pipelines, but no idea, if they can resolve your device like above … :[