Giter VIP home page Giter VIP logo

Comments (30)

jacobbo avatar jacobbo commented on July 24, 2024

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.

Chidilives avatar Chidilives commented on July 24, 2024

This Happens on both the in built camera and a Logitech c210 webcam.

from webeye.

zuckerthoben avatar zuckerthoben commented on July 24, 2024

I have the same error: Surface Pro 4 with current updates.

from webeye.

wakuflair avatar wakuflair commented on July 24, 2024

Win7 has the same error

from webeye.

 avatar commented on July 24, 2024

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.

jshansen avatar jshansen commented on July 24, 2024

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.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

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.

jacobbo avatar jacobbo commented on July 24, 2024

What's the error's HRESULT code? 0x80040217?

from webeye.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

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.

jacobbo avatar jacobbo commented on July 24, 2024

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.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

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.

jacobbo avatar jacobbo commented on July 24, 2024

You could try GraphEdit to find out which filters are missing:
https://code.google.com/p/graph-studio-next/

from webeye.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

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.

jacobbo avatar jacobbo commented on July 24, 2024

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.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

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.

jacobbo avatar jacobbo commented on July 24, 2024

I could try to add this fix to the control at the weekend and you could test it on your machines.

from webeye.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

That's would be great, you can create separate branch or whatever convenient way you prefer. Thanks.

from webeye.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

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.

jacobbo avatar jacobbo commented on July 24, 2024

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.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

win81capture
Win81Capture.txt

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.

jacobbo avatar jacobbo commented on July 24, 2024

Thanks! As I said, I'll try to come up with a solution, but not earlier than this weekend.

from webeye.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

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.

jacobbo avatar jacobbo commented on July 24, 2024

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.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

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.

jacobbo avatar jacobbo commented on July 24, 2024

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.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

In my case it solves error, I created custom library build with VMR7 and its working on both win8.1 and win10.

from webeye.

jacobbo avatar jacobbo commented on July 24, 2024

Thanks for your feedback! I'll try VMR7 this weekend and if it works well then I'll replace VMR9.

from webeye.

jacobbo avatar jacobbo commented on July 24, 2024

I've replaced VMR9 with VMR7 (Debug.zip). When you have a chance, could you please test it on your configurations?

from webeye.

YevgenijZ avatar YevgenijZ commented on July 24, 2024

I ran demo app and my app with dll from archive, both works fine on Win10, Win8.1. Thanks.

from webeye.

jacobbo avatar jacobbo commented on July 24, 2024

Good, thank you.

from webeye.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.