-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to add a video capture filter #3
Comments
I tried two different Windows 10 machines and was unable to reproduce this issue, though I am aware of it. Which camera model are you using? |
This Happens on both the in built camera and a Logitech c210 webcam. |
I have the same error: Surface Pro 4 with current updates. |
Win7 has the same error |
One way it occurs, if you try to use the WebCameraControl when you try to StartCapture() and the control has its Visibility set to collapsed. If you make sure the control is visible before invoking StartCapture it will not have that error. |
I had the same exception when I attempt to start the capture immediately from the constructor of the window. When I initialize it from e.g. a button click, it works fine. |
This happens on any fresh Windows 8.1 machine. Windows 7, 10 is fine. |
What's the error's HRESULT code? 0x80040217? |
Yes |
Sorry, but most probably you'll have to install something to make your camera work with the control. This error means that some required directshow filters are missing on your machine. Here is a similar issue: |
It is on four different machines with different cameras including integrated one on laptop, pre-installed camera app works just fine. |
You could try GraphEdit to find out which filters are missing: |
Interesting that on Win8.1 GraphStudio inserts -> MJPEG decompressor -> Color Space Converter in between capture filter (camera) and output renderer. On Win10 it is direct play back from capture filter to renderer. |
That's weird. I'd assume that Win10 uses a different default driver for webcams that does MJPEG decompression internally. If this is a quite common error then a solution would be to add these filters explicitly to the graph. |
Yes, I tried to add them in win10 (in graph studio) as well and it does no harm, where on Win8.1 they are must. |
I could try to add this fix to the control at the weekend and you could test it on your machines. |
That's would be great, you can create separate branch or whatever convenient way you prefer. Thanks. |
Interesting thing is that graph studio somehow able to determine whether it needs to add two additional filters: |
Yes, that's the question: how it does that. Is it a directshow feature or something on top of it? |
Graph studio export of Win8.1 graph It's from Win8 under VirtualBox, but initial problems from physical machines, I just don't have access to them right now. |
Thanks! As I said, I'll try to come up with a solution, but not earlier than this weekend. |
Ok, finally managed to understand the issue. This is nothing to do with intermediate filters (decompressor and color converter) - RenderStream uses smart connect and able to add them if needed. So my solution is to fork your project and use VMR7 renderer in custom library build, I already did this and it seems to be working on both Win8.1 and Win10. You don't need to fix anything, but if you'll have a time you can add parameters to specify which renderer to use inside DirectShowFacade. |
The video renderer on your picture, is it VMR7, not VMR9? I do not really remember why I chose VMR9 instead of VMR7. VMR9 offers more features, but the control doesn't use any of them. Anyway, if smart connect successfully builds graphs with VMR7 and fails to build them with VMR9, then VMR7 seems as a better fit for the control. |
Yes, renderer on my picture is not VMR9 and even not VMR7 but even more older one because I didn't noticed that graph studio uses it by default at that moment. So ignore pictures. Then tried to use VMR9 on Win8.1 and it failed but was ok with VMR7 and EVR. You are using VMR9 - HRESULT hr = g_spRenderFilter.CoCreateInstance(CLSID_VideoMixingRenderer9);. I would say that you can switch to VMR7 because it seems more "stable". |
What do you mean by 'stable' here? I'm interested to fix the 0x80040217 error. |
In my case it solves error, I created custom library build with VMR7 and its working on both win8.1 and win10. |
Thanks for your feedback! I'll try VMR7 this weekend and if it works well then I'll replace VMR9. |
I've replaced VMR9 with VMR7 (Debug.zip). When you have a chance, could you please test it on your configurations? |
I ran demo app and my app with dll from archive, both works fine on Win10, Win8.1. Thanks. |
Good, thank you. |
Failed to add a video capture filter
Error Code 0x8004021
this Error is only happening in windows 10 machines. it still works perfectly on other OS
The text was updated successfully, but these errors were encountered: