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

Dual camera, moniker string?

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

Dual camera, moniker string?

Postby gripner » Thu Oct 25, 2018 9:16 pm


Im trying to use 2 identical webcameras with aforge, did not get it working so googled some and found ppl saying, cant have same moniker string. So started checking there. this is what i have.

When I use 2 diff cameras it works, see moniker strings

When I use 2 identical cameras this is the 2 moniker strings

to me the moniker strings are clearly different.
I have tried the two camera samples, same result in that application.

Anyone got any idea?
Posts: 1
Joined: Thu Oct 25, 2018 9:03 pm

Re: Dual camera, moniker string?

Postby andrew.kirillov » Fri Oct 26, 2018 7:02 am


Well, it really depends on camera drivers. I heard from people many times, that if they have two identical cameras, then things don't work for them. Long time ago I had two cameras of the same model and luckily it did work fine (some cheap noname cameras, so can not name them). The problem is that some manufacturers (or driver developers) simply can not think of a use case for two cameras.
With best regards,

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

Re: Dual camera, moniker string?

Postby JuKu » Sat Nov 03, 2018 3:39 pm

At least on Windows, two identical cameras work without issues. You can find link to the source code of my software at to see how I did it. The application will work without the associated hardware, so you can try it, too.
Posts: 16
Joined: Wed Nov 13, 2013 10:44 am

Re: Dual camera, moniker string?

Postby JuKu » Tue Nov 13, 2018 1:07 pm

I'm back in the office, so I can look in my code. I do all kinds of tests to see it actually starts etc(*), but basically it is simple:
Code: Select all
VideoSource = new VideoCaptureDevice(MonikerStr);
VideoSource.NewFrame += new NewFrameEventHandler(Video_NewFrame);

*: In practice, it is not this simple. The issues are in Windows and USB, not in Aforge. Some systems can use both at the same time, usually those that have separate USB controllers in the machine, others are limited to one at the time. On some of these, you need to stop both cameras and set VideoSource to null and create the source again, some are fine using just start and stop. See also about issues on multiple USB cameras.
Posts: 16
Joined: Wed Nov 13, 2013 10:44 am

Return to AForge.NET Framework