2

I'm using DirectShowNet in C#. I've been developing an application to work with webcams to display video, change resolution, and take pictures (either Still pin or from the Capture stream). I've been testing it on 2 different machines (Win 7 64-bit & Win 8 64-bit) and with the internal webcams on those machines (they are laptops) and 2 other webcams, Logitech C920 and Microsoft LifeCam Studio.

One day, the LifeCam Studio stopped working on my Win 8 machine. Using GraphEditPlus, checking the VideoFormats for the Capture pin, I notice that, mysteriously, the RGB24 formats are no longer listed. I have written my application to use only 24-bit color format. Only YUY2 16-bit formats are listed. If I check the same webcam on my Win 7 machine, I see both the YUY2 and the RGB24 formats being listed. Previously, my Win 8 machine did list both of these formats.

The question is, what could cause DirectShow to change the list of VideoFormats for the Capture pin? So far, I've noticed that changing driver versions makes a huge difference for webcams in what pins they support, but I haven't seen them change video formats like this. As far as I know, I have not updated the drivers for the webcam on either machine.

Here are the driver versions for both machines.


LifeCam Studio - Windows 7 - 64-bit

LifeCam Studio - Windows 7 - 64-bit

LifeCam Studio - Windows 8 - 64-bit

LifeCam Studio - Windows 8 - 64-bit

Michael Yanni
  • 1,286
  • 3
  • 15
  • 26
  • Windows updated rolled out a driver update that does not support 24-bit RGB anymore? It should be not a big deal to get `YUY2` converted to RGB by the way, and since it is a problem for you now odds are high you are doing something in a shaky way. – Roman R. Aug 02 '13 at 19:56
  • The reason only 24-bit formats are supported is because I'm connecting a SampleGrabber with a hardcoded media format of MediaSubType.RGB24. This format seems to work with any of the 24-bit formats properly. It would make my solution much more complex if I have to re-create the sample grabber depending on the resolution the user selects. Plus, it makes my API much simpler if when a dev gets the supported video formats, it only gives 1 set of resolutions, instead of multiple ones depending on the color format. – Michael Yanni Aug 02 '13 at 20:09
  • Under normal conditions, if camera supports YUY2 only and you set SG to use 24-bit RGB, the converter/decoder is supplied automatically (so that many even don't realize it's there - it just works). – Roman R. Aug 02 '13 at 20:10
  • Agreed. But, it still doesn't answer why my machine does not have the same list of video formats for the Capture pin on the same webcam. I basically just want the same drivers for each so I don't have to deal with them being different. – Michael Yanni Aug 02 '13 at 20:17
  • 1
    The drivers are apparently different. DirectShow user mode filters only forward formats drivers expose... – Roman R. Aug 02 '13 at 20:24

1 Answers1

3

I figured out how to get the formats back. I went into device manager and found the "Microsoft LifeCam Studio" device. I uninstalled it and hit the checkbox to "Also delete the driver for this device". After that, I refreshed device manager, and when the device was found, it had the name "Microsoft® LifeCam Studio(TM)", but then changed to "Microsoft LifeCam Studio". That made me realize that it automatically updated the driver.

As you notice in my Win 8 screenshot above, the button "Roll Back Driver" is enabled. This means that the driver was updated at some point. I proceeded to roll back the driver, which changed the name back to "Microsoft® LifeCam Studio(TM)".

Now, in GraphEditPlus, the device lists YUY2, MJPG (24-bit), and M420 (12-bit) video formats for the Capture pin. This seems to be what I have had in the past. It works properly with my application now since a 24-bit format is available.

Overall, Microsoft removed some of the DirectShow functionality of the device when they made the Windows 8 driver. This old driver is from 2006 and works fantastically with Windows 8. I'm assuming it is one built into the OS that was carryover from old Windows OS's.

Here is a screenshot of the working driver for others that would like more video formats available for the LifeCam Studio in Windows 8.


LifeCam Studio - Windows 8 - 64-bit - Original Driver

enter image description here

Michael Yanni
  • 1,286
  • 3
  • 15
  • 26