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

Problem with saving images from 2 or more video sourcess usi

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

Problem with saving images from 2 or more video sourcess usi

Postby Kiril_B_Iliev » Wed Oct 12, 2016 1:54 pm

Hi Aforgers!

I am having some troubles with really specific problem using Aforge (video streaming and frame capturing).
I am trying to start 2 video streams without visualizing them and capture a image from each of them on a different event.
AND IT WORKS! But while having these 2 streams casting it starts automatically to capture different images after non specified amount of time.
The "video_NewFrame" is a bit complex but it works perfectly while only one of the cameras is streaming.
I will be glad to now why it starts capturing random snapshots while both of the stream are on. Or may be another solution for cases as this one ...4

Thanks in advance!

// enumerate video devices
videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
// create video source

videoSource = new VideoCaptureDevice(videoDevices[0].MonikerString);
// set NewFrame event handler
videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame);

videoSource1 = new VideoCaptureDevice(videoDevices[1].MonikerString);
// set NewFrame event handler
videoSource1.NewFrame += new NewFrameEventHandler(video_NewFrame1);
Posts: 1
Joined: Wed Oct 12, 2016 1:39 pm

Return to AForge.NET Framework