View Full Version : How do I do a preroll?

Jack Johnson
March 30, 2008, 05:33:59

What I'd like to do is have live video (from a camera) stored in a ring buffer for a certain number of frames. (say 150). The buffer is continously updates with the last 150 frames. When I say stop I want to write the 150 frames out as a compressed Avi file.

How do I do this with your control.

Thanks much.


Stefan Geissler
March 31, 2008, 07:37:04

the sample you need is here:

But saving images into an AVI file is much more complicated. A solution can be downloaded from this post. It uses an own DLL, that is uses the old video for windows interface. Thus not all available codecs will work.

On http://www.codeproject.com you can find a similar sample implementing all of this in C#. For this you can use the "Bitmap" property of the ImageBuffer.

If you would create the same with DirectShow, then things start to begin complicated.