问题
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 8 - 64-bit
回答1:
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
来源:https://stackoverflow.com/questions/18025080/directshow-microsoft-lifecam-studio-rbg24-format-lost