简体   繁体   中英

Simple videomaker from images

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 :

  • ffmpeg - can do the job over command line interface. But I need the utility to be an application, not a command line interface. (Can it be made into an exe?)
  • matlab - don't have matlab installed, cost is a concern
  • Flash - don't know how it's done
  • C++ - No standard library approach, looks complicated through Windows API

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)

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

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.

Using OpenCV may help.

You can look at THIS tutorial.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM