View Full Version : Writing Image Streams to an AVI file

March 3, 2010, 15:12:56

I have an app which opens a Grabber on a camera, connects it to a 6 image FrameHandlerSink in GrabberSinkType::eRUN mode, and also adds a Listener callback handler for GrabberListener::eFRAMEREADY events. The callback pulls frame buffers using getLastAcqMemBuffer(), and from there our app does custom processing of the frames including increasing the overall frame size.

So far so good - we also have implemented a still image capture function that writes .png format processed frames on demand.

Where we want to go from here is to write the processed image stream to an .avi file using a selected codec.

Is there an easy way to take our series of processed frame buffers and feed them to the codec and container using the IC imaging library?



Stefan Geissler
March 3, 2010, 16:06:54

I am afraid, this is not as easy. If you use a framefilter instead of the Grabberlistener for image processing, then you can use the IC Imaging Control AVI Capture functions. You may have a look here: http://www.imagingcontrol.com/en_US/library/cpp/image-and-avi-capture/

However, if you want to write selected files in an AVI file, then the stuff gets more complicated. Years ago I found a sample code for writing RGB24 images into an AVI files using the old VfW interface on http://www.codeguru.com. This sample allowed to use VfW (Video for Windows) codecs only. May be this is a help for you.