Comments (30)
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?
from webeye.
This Happens on both the in built camera and a Logitech c210 webcam.
from webeye.
I have the same error: Surface Pro 4 with current updates.
from webeye.
Win7 has the same error
from webeye.
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.
from webeye.
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.
from webeye.
This happens on any fresh Windows 8.1 machine. Windows 7, 10 is fine.
It is possible to replicate with WebCameraDemo from source files.
from webeye.
What's the error's HRESULT code? 0x80040217?
from webeye.
Yes
WebEye.Controls.Wpf.DirectShowException: Failed to add a video capture filter. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040217
--- End of inner exception stack trace ---
at WebEye.Controls.Wpf.DirectShowProxy.AddCaptureFilter(String devicePath)
at WebEye.Controls.Wpf.WebCameraControl.StartCapture(WebCameraId camera)
from webeye.
Sorry, but most probably you'll have to install something to make your camera work with the control.
This could be a Windows service pack or drivers from your camera manufacturer.
This error means that some required directshow filters are missing on your machine. Here is a similar issue:
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/b3a4b061-dc10-4e72-9654-55ba55be9ae8/error-0x80040217?forum=windowsdirectshowdevelopment
from webeye.
It is on four different machines with different cameras including integrated one on laptop, pre-installed camera app works just fine.
It is fresh win8.1+NET4.5.2+all latest updates via windows update.
Looks like something systematic, but ok I'll have look what I might have missed.
from webeye.
You could try GraphEdit to find out which filters are missing:
https://code.google.com/p/graph-studio-next/
from webeye.
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.
So play back works via GraphStudio but with additional elements in graph.
from webeye.
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.
from webeye.
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.
from webeye.
I could try to add this fix to the control at the weekend and you could test it on your machines.
from webeye.
That's would be great, you can create separate branch or whatever convenient way you prefer. Thanks.
from webeye.
Interesting thing is that graph studio somehow able to determine whether it needs to add two additional filters:
mjpeg decoder and color space converter
from webeye.
Yes, that's the question: how it does that. Is it a directshow feature or something on top of it?
I use Intelligent Connect to build the graph and it fails to build it properly for your configuration.
from webeye.
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.
from webeye.
Thanks! As I said, I'll try to come up with a solution, but not earlier than this weekend.
from webeye.
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.
Problem is with VMR9 as final renderer which is not working for my camera on Windows 8.1 (but working on Windows 10). This is clearly visible when I explicitly use VMR9 in GraphStudioNext - smart connect is not able to create filter path from camera source to VMR9 renderer. As you said may be something wrong with drivers, I don't know.
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.
from webeye.
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.
from webeye.
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.
Why it failing I don't know.
On win10 you can use camera output as YUY2 directly to VMR9 or camera output as MJPG with decompression filters - both works.
On win8 YUY2 not available for any of my two cameras and MJPG to VMR9 not working. Don't know why.
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".
from webeye.
What do you mean by 'stable' here? I'm interested to fix the 0x80040217 error.
Do you think replacing VMR9 with VMR7 would solve the error in your case?
from webeye.
In my case it solves error, I created custom library build with VMR7 and its working on both win8.1 and win10.
from webeye.
Thanks for your feedback! I'll try VMR7 this weekend and if it works well then I'll replace VMR9.
from webeye.
I've replaced VMR9 with VMR7 (Debug.zip). When you have a chance, could you please test it on your configurations?
from webeye.
I ran demo app and my app with dll from archive, both works fine on Win10, Win8.1. Thanks.
from webeye.
Good, thank you.
from webeye.
Related Issues (20)
- Gray screen when play H.265 stream HOT 1
- Could not load file or assembly WebEye.Stream.Win32 HOT 11
- memory Leak HOT 1
- Is it possible to support switching between the front / back cameras on a tablet device? HOT 7
- image is horizontally flipped HOT 8
- GetLocalStreams error HOT 4
- 'System.BadImageFormatException' in mscorlib.dll: Could not load file or assembly 'WebEye.Stream.Win32.dll' HOT 4
- I Do All things Ok, but my online stream http don't have voice HOT 4
- Add a License.md
- Video delay of 2 seconds HOT 4
- If i create the control dinamically it stays blank HOT 1
- Error playing RTMPS stream HOT 1
- Missing WebEye.Stream.Win32 and WebEye.Stream.x86 HOT 1
- streaming errors in ffmpeg 4.2.1
- WebEye project from Github HOT 1
- Problem with the dll for 32-bit architectures HOT 1
- Memory Leak / Stream not stopping HOT 1
- Increase the video speed
- Crash with Access Violation on resume after failed stream
- debo instalar algo antes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webeye.