Question

DONE SO FAR

I use AForge MJPEGStream to get bitmaps from different IPcams and display them in my app. Now I want to record multiple (like at least 8) of these bitmapstreams to the local HDD. I already used AForge AVIWriter (DLL) to write the file of 1 stream from a List, but because those Bitmaps all go in RAM I had to write it to HDD earlier (so I can record 8 streams at once). So I tried to write a frame every NewFrame-event to HDD. The problem with this is that AVIWriter.Open(string fileName, int width, int height) uses Win32.OpenFileMode.Create instead of Win32.OpenFileMode.ReadWrite and so deleting the videofile instead of opening it to add a frame.

Preferred goal

Record multiple MJPEG streams to disk as video files(could be done from the NewFrame-even described above, which provides Bitmaps). The very best result would be 1 hour long .MKV files encoded with X264. I don't care how to achieve this goal as long as it's done within my existing project in C# (so no need to keep using AForge).

Was it helpful?

Solution

I use wmv3 AVI's from AForge.Writer. I open the file in the constructor and let the newFrame event write every frame. It's not as good as I hoped, but it'll do.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top