AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Cannot connect to webcam on Windows 7 32 bit PC

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

Cannot connect to webcam on Windows 7 32 bit PC

Postby twinPrimesAreEz » Fri Feb 05, 2016 4:21 pm

Using the Simple Player found here

http://www.aforgenet.com/framework/samples/video.html

I am unable to connect to my Logitech C920 HD webcam. If I go to local capture devices, I can see my webcam. When I select it and press 'Connect,' the video screen just stays stuck at 'connecting.'

Programatically, I cannot get a new frame event either. The following code never returns a new frame. There are no errors either, it just never gets a new frame

Code: Select all
...
                videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
                if (videoDevices.Count > 0)
                {
                    // create video source
                    videoSource = new VideoCaptureDevice(videoDevices[0].MonikerString);
                    // set NewFrame event handler
                    videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame);
                    // start the video source
                    videoSource.Start();
                }
...

        private void video_NewFrame(object sender, NewFrameEventArgs eventArgs)
        {
            Bitmap b = eventArgs.Frame;
            _latestFrame = new Bitmap(b, 960, 720);
            ...
        }


This problem happens with both my app and the sample app even after a fresh reboot. I know it is not a computer/webcam/driver problem because I have another app that uses a different library (small .net wrapper around the dshow lib) and can get new frames from the webcam just fine.

Is there anything I can do to resolve/debug the issue? I`d prefer to use AForge for this project but it doesn`t seem to be working (note: this exact same webcam and code works just fine on a 64 bit Windows 7 PC).
twinPrimesAreEz
 
Posts: 5
Joined: Tue Jan 12, 2016 6:59 pm

Re: Cannot connect to webcam on Windows 7 32 bit PC

Postby andrew.kirillov » Sat Feb 06, 2016 3:40 pm

twinPrimesAreEz wrote:Is there anything I can do to resolve/debug the issue?

Yes. Debug with the AForge.NET Framework's code. Step through the code, put extra logging, etc.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Cannot connect to webcam on Windows 7 32 bit PC

Postby SamHerbert-Hale » Tue Apr 11, 2017 3:23 pm

Did you ever get this working? I'm having a similar issue with the Logitech Smart Dock's built-in HDMI capture card - it seems like the capture feed is displayed successfully every other time I select the device, either selecting another webcam first and switching back to it or by closing and starting the application again. It's very frustrating to have an inconsistent experience with the capture card, all of my webcams work as expected.
SamHerbert-Hale
 
Posts: 2
Joined: Tue Apr 11, 2017 3:18 pm

Re: Cannot connect to webcam on Windows 7 32 bit PC

Postby diegopego » Fri May 05, 2017 7:40 pm

same here. any update on this? thanks
diegopego
 
Posts: 1
Joined: Fri May 05, 2017 7:40 pm

Re: Cannot connect to webcam on Windows 7 32 bit PC

Postby andrew.kirillov » Sat May 06, 2017 7:34 am

Just debug. You have both - the camera causing the issue and the source code. What else is needed?
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Cannot connect to webcam on Windows 7 32 bit PC

Postby flavioacm » Mon May 08, 2017 6:13 pm

I´m having the same problem, with logitech and Microsoft cameras.

The strange is that these computers was working normally, but suddenlly stopped work. When I execute the .start() method appears the "connecting" message, and the method returns without any errors.

All the computers are using Windows seven (32 and 64 bits), so I think that was some Windows update that changed some internal method to access the video sources.
flavioacm
 
Posts: 1
Joined: Mon May 08, 2017 5:45 pm

Re: Cannot connect to webcam on Windows 7 32 bit PC

Postby erthling » Tue Dec 12, 2017 4:04 pm

I know this is a long delay but it might be helpful to someone.
Had the same problem-- stuck at "Connecting..."
I am developing new app under VB.Net.
Problem turned out to be that it was missing the DLL
named: AForge.Imaging.dll. When not present, it doesn't complain,
but simply fails to work!
erthling
 
Posts: 1
Joined: Tue Dec 12, 2017 3:59 pm

Re: Cannot connect to webcam on Windows 7 32 bit PC

Postby yojanmorales » Wed Mar 06, 2019 9:01 pm

I have the same error, I verified everything you say guys but is not working for me.
any other solution, please with the same camera Logitech C920 HD webcam
I can't reproduce it, because the camera is on the customer computer not in my machine, the customer has windows 10, 64 bits

Thanks
yojanmorales
 
Posts: 1
Joined: Wed Mar 06, 2019 8:58 pm




Return to AForge.NET Framework