Sequenced PNG to AVI

Hi all. I know it's been just under a year since last time I was here. Been about that long since I last messed with c++ too. At any rate, I'm trying to create a quick and dirty program.

I searched online for anything that will take a sequence of png images (file01.png file02.png etc..) and turn into an uncompressed avi keeping the alpha channel.

Most ppl say to use windows movie maker. The lowest time I can set a single image to show is 0.07 seconds which works out to about 14 frames a second. Not the 24 to 30 fps I'd like.

So I am trying to write a quick console app that I can drop a single file onto. It should take the name, search the folder the file is located and build a list of files with similar names. (basically split the numbers off the end to use for sequence order, and match the file names.) This part I can do. Asking for the number of miliseconds to show each frame will be easy too.

But then I need to load each png into a buffer and write one after another to the avi stream. I looked over the msdn library on the iavistreamwrite info, and even found a couple sample codes from google on writing to the iavistream but none of it tells me what needs to be in the buffer.

How do I import the png into the buffer so that it can be passed to the iavistream ??

Any help? (While waiting, I'll be looking up the how to on searching the folder for other files.)
The SDL has an extension for loading PNG files into an SDL_Surface. From there you can get the pixel information and put it into a char array. I don't know about converting it to AVI format, though...
Well, as far as converting it to avi, the MSDN just says a LpBuffer of type LpVoid
and the examples I found refer to a DibSection with which they are adding bitmaps.

an example would be this nice c++ class for creating avi's
http://www.adp-gmbh.ch/win/programming/avi/avi.html

A link at the top of the page shows examples of how to use it.
But I don't know how to go from PNG to Bitmap. Is the data the same once loaded to a surface and then to a char array?

Also, Recently was introduced to Boost (as of an hour ago) so am looking at it. Anyone know if it has a library for handling png's?
Last edited on
You can try using other video-editing program, like Sony Vegas, it's not free..., but you know torrent...
eh. yea.. I could get after effects free if i wanted to pirate it.. and considering the cost of it is $999, yet many kids are using it on youtube, tells me almost everybody pirates that one. But I don't like pirating. Not when I can find a free alternative.

Wax 2.0 does chroma key, and has a basic particle effect thing, plus some good text and a couple other basic things.. Not as good as after effects.. but If i could create effects in an image editing program and composite over video it would be kewl. could even make some of those effects downloadable.

Could also do some animated backgrounds and text bars or other things.

Also, if i could get the hang of working with images, or surfaces.. I might start a project that would be an opensource freeware version of after effects.. but thus far that is out of my experience.
Topic archived. No new replies allowed.