My application receives a sequence of images (BitmapImage) from external device with rate 30 fps. I'm using Aforge.net library for save the received stream in .avi file. I used the following code for inizializing the AVIWriter:
AVIWriter writer;
writer = new AVIWriter("wmv3");
writer.FrameRate = 30;
writer.Open("test.avi", 320, 240);
And for each frame received I add it in the video stream, with the following code line:
writer.AddFrame(ResizeBitmap(BitmapImage2Bitmap(e.ColorFrame.BitmapImage),320,240));
But the generated file is too heavy. (10 secondos corresponds to about 3Mb).
I tryied also setting a low level of writer.Quality
, but the result seems the same (just 5-7% less).
So, I need a more efficient compression.
What are the compressions supported in Aforge.net ? What compression should I use in order to reducing the weight of saved file?