Rendering Issues with DirectShow and USB Video Sources

509 Views Asked by At

We are trying to get DirectShow work with USB video capture devices like this. The code simply adds the capture source's filter (capFilter) in the capture graph and then connects it to VMR9 renderer already added to the graph.

captureGraph.RenderStream(null, MediaType.Video, capFilter, null, vmr9);

At present, everything runs without throwing any exception, but the output is just black. I checked the capture source's output in GraphStudio, but it also resulted in the same black output.

I'm able to get the same code to work with all of the USB and HDMI based video capture devices and webcames.

2

There are 2 best solutions below

0
On

What about source filter pins? Maybe MediaType.Stream will work if no video pin (like for some H264 webcams without normal video pin)

0
On

Video might be black for several reasons:

  • weird capture format (typically pixel format)
  • buggy filter registered with Windows/DirectShow which interferes and incorrectly decodes video
  • the capture device has a crossbar which is set to take image from a supposed differect physical input, including non-existtent