Reputation: 71
My application generates a set images named sequentially. Eg. img1, img2, img3, ...
I am looking for ways to convert these images into a movie. So far, I found these options, each with a major disadvantage :
Ideally, the utility will be an executable when launched will read all the sequentially named images in its root and generate a video (any format - .avi, .wmv, etc)
Upvotes: 0
Views: 229
Reputation: 1079
ffmpeg is built on top of several C libraries, which can be found available through the Libav project (or distributed with ffmpeg itself). It provides several audio and video encoding and decoding options that may be of interest.
Buried in the documentation is a set of examples, available here. The video encoding function is I believe the basis of what you want to do.
And no, sadly, I can't promise that the API is very well documented or comprehensible. You can find scattered examples across the internet implementing the library.
Upvotes: 1
Reputation: 5002
As this page says: http://www.codeproject.com/Articles/4169/A-simple-interface-to-the-Video-for-Windows-API-fo
You can do it with Windows API for AVI, just you need to do:
#include "aviUtil.h".
Call START_AVI("foo.avi"); // you must include the .avi extention.
Call ADD_FRAME_FROM_DIB_TO_AVI(yourDIB, "DIB", 30); // the dib is passed in as a HANDLE which can be obtained by loading the image with a Image library. (I used CxImage which is available on this site). Put this call in a while or for loop to add all the images you want to the AVI.
Call STOP_AVI(); //this closes the avi and video.
There is a sample on that page. It does exactly what you want
Upvotes: 1