jacobbo / WebEye

WebEye is a collection of .NET controls.
190 stars 132 forks source link

'Failed to add a video capture filter.': Value does not fall within the expected range #49

Open simonallen5 opened 6 years ago

simonallen5 commented 6 years ago

As a new c# programmer I am trying to integrate the webcamera control into an existing program. I have )I think) installed all the required bits - and the demo program runs fine on my pc. However I am getting the 'Failed to add a video capture' error when implemented within my own program, with the 'Inner Exception' ArgumentException: Value does not fall within the expected range.

Any help much appreciated!

jacobbo commented 6 years ago

Hello, here are the sources of demo app: https://github.com/jacobbo/WebEye/tree/master/WebCameraControl/WPF/WebCameraDemo

simonallen5 commented 6 years ago

Thanks. The demo app works OK though. Are there elements amongst this that I need to copy / install into my other program?

jacobbo commented 6 years ago

No, the demo app installs all dependencies automatically, you just need to build it. You can use the demo app solution as a starting point for your app.

simonallen5 commented 6 years ago

That's what I thought! I had copied the code elements from the Demo App into my app - it compiles OK but I get the above error on clicking the Start button. I'll try it the other way round - import my code into the Demo App, which is working, and see what happens

jacobbo commented 6 years ago

If you start a new solution, then you have to add a Nuget package by running the following command in the Nuget console: Install-Package WebEye.Controls.Wpf.WebCameraControl

simonallen5 commented 6 years ago

Yes - did that. I was able to see the dll and put the control into the Toolbox, from where I added it to my form