Accord.NET for a video capture application?

876 views
Skip to first unread message

Jfcote

unread,
Sep 15, 2014, 11:42:13 AM9/15/14
to accor...@googlegroups.com
Hi Cesar!

It's been a while since my last question. Right now, I'm asked to replace an old application written in C++ with a .NET one. This application was used to capture video from a live camera. I think It was written using DirectDraw with the use of filters to "write" text on the final video. When the user press "stop" on the application, everything is written to a file.

What I want to know is if the Accord.NET is a good choice for this application or should I just go directly with AForge.NET? Also, we have a commercial version of EmguCV which can also do some video capture work (using openCV in the background). I don't know if you have an advice on which way to go with these tools with your good experience.

Thanks a lot!
Jean-François

César

unread,
Sep 15, 2014, 12:06:57 PM9/15/14
to accor...@googlegroups.com
Hi Jean-François!

For the specific application you are describing, it seems AForge.NET would suffice. If you need to overlay text over your captured video frames, perhaps you can do something exactly like I did on another personal project that I started, Screencast Capture. This application captures a video stream from the desktop screen, adds a few texts on top of it, then saves it to the disk. It works by using AForge's VideoPlayer and ScreenCaptureStream, but you can replace them by AForge.NET's VideoCaptureDevice.

Here is where the application processes a new frame being received by the stream:

It creates a Graphics object from the image (line 503) then passes it along to other classes that draw things over the frame. For example, one of the classes is responsible for writing any keys being pressed to the image. Its code can be seen at

Afterwards, it stores the images into a H264 stream using my own version of an FFMpeg implementation that was originally part of AForge. But it should work with the original VideoFileWriter from AForge.NET as well. The writing of the frames is done at 


Hope it helps!

Best regards,
Cesar

Jfcote

unread,
Sep 15, 2014, 12:53:15 PM9/15/14
to accor...@googlegroups.com
Thank you very much for this quick answer!

I think I will use AForge but will use your sample as a starting point!

Have a good day :)
Reply all
Reply to author
Forward
0 new messages