no combination of intermediate filters could be found


I'm making a windows form application using Visual Studio. The application allows you to enter the what you want the photo to be named, and then saves that image to a specific location on the network. It works great when I use it on my laptop. However, when I try to run it on the a desktop, it does not work. Instead I get the message:

System.Runtime.InteropServices.COMException (0x80040217): No combination of intermediate filters could be found to make the connection.

at DirectShowLib.DsError.ThrowExceptionForHR(Int32 hr)

at OrderProductCapture.Capture.SetupGraph(DsDevice dev, Int32 iWidth, Int32 iHeight, Int16 iBPP, Control hControl)

at OrderProductCapture.Capture.ctor(Int32 iDeviceNum, Int32 iWidth, Int32 iHeight, Int16 iBPP, Control hControl)

at OrderProductCapture.frmMain.ctor()

The Call Stack says:

OrderProductCapture.exe!OrderProductCapture.Capture(int iDeviceNum, int iWidth, int iHeight, short iBPP, System.Windows.Forms.Control hControl) Line 82
OrderProductCapture.exe!OrderProductCapture.frmMain.frmMain() Line 50
OrderProductCapture.exe!OrderProductCapture.Program.Main() Line 19

I have already googled this many times, and I've looked at most of the similar questions on SO. Both computers are using Windows 7 professional. Any help would be fantastic.

This is the code where my code catches the exception. I do not think the code is wrong, because it works fine on my laptop.

public Capture(int iDeviceNum, int iWidth, int iHeight, short iBPP, Control hControl)
        DsDevice [] capDevices;

        // Get the collection of video devices
        capDevices = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);

        if (iDeviceNum + 1 > capDevices.Length)
            throw new Exception("No video capture devices found at that index!");

            // Set up the capture graph
            SetupGraph( capDevices[iDeviceNum], iWidth, iHeight, iBPP, hControl);

            // tell the callback to ignore new images
            m_PictureReady = new ManualResetEvent(false);
asked on Stack Overflow May 30, 2014 by carrizal • edited Jun 2, 2014 by quetzalcoatl

1 Answer


When having to convert between media formats, you can programmatically force it to use some specific filter chain and configure it tightly to your needs, but DirectSHOW also has the ability of "guessing" the right tools to use. It knows all the tiny media handlers that are oficially installed in the OS, and tries to match them so that final required "conversion" is built.

However, DirectShow still needs those tiny converters to be installed. DS is able to analyze and connect them, but will not provide you any support for exotic media types. Often, even non-exotic can be problematic if the OS is "fresh-n-clean".

If I remember correctly, that error basically means that (on this problematic machine) some "codecs" are missing.

These things often come with any:

  • drivers for webcams/microphones/soundcards
  • audio-processing software (sound editors, media recorders, media players, ..)
  • "codec packs" like CCCP (really, don't get confused by their logo)
  • specific codec/filter packages
  • (...)

First thing I'd now do would be:

  • recall what I tried to convert
  • try to read all error messages and logs and find out if there's some faulty filter mentioned, maybe it needs reinstalling
  • compare what audio-related software is installed on machines where the program WORKS versus the problematic machine
  • basing on the above, try to deduce what codec is missing
  • find it, download, install

Also, you may read the code of SetupGraph() function. I bet there's a clear reference to the format that is being used, and this may point out what codec is missing.

Codecs also sometimes get damaged (actually not themselves, but their configuration and registration entries may get damaged). If you are sure that the correct codecs are available on the machine, reinstalling or "repairing" (if they have such option) them can help.

answered on Stack Overflow Jun 2, 2014 by quetzalcoatl

User contributions licensed under CC BY-SA 3.0