Page 1 of 1
Creating an AVI, frame by frame, without using image files
Posted: Tue Aug 09, 2011 2:25 am
by Seymour Clufley
I'm writing a program which creates a video by drawing one frame at a time and saving it as a numbered bitmap file. Once all the frames have been done, a program (
BMP2AVI) stitches the bitmap files together to make an AVI.
Wouldn't it be faster to feed each image into a "stream" as it gets made? This would cut out the time it takes PB to save each bitmap, and the time it takes the stitching program to read each bitmap.
If it would be faster, does anyone know of a way to do it? Any freeware utilities that I could use in my program?
Re: Creating an AVI, frame by frame, without using image fil
Posted: Tue Aug 09, 2011 3:24 am
by IdeasVacuum
...you could write it all in PB for sure, but BMP to AVI code published in this and other PB forums does not work straight out of the box with v4.5. I have not had the time to write a solution myself, but take a look at this link:
http://www.purebasic.fr/english/viewtop ... 83#p317283
If you search for BMP to AVI on this forum you will find a lot of interesting info, though mostly it is Windows based.
Re: Creating an AVI, frame by frame, without using image fil
Posted: Tue Aug 09, 2011 3:28 am
by idle
yes it would, the procedure its not to different from how you'd play back an AVI the timing can be an issue though.
I can dig around in my archives for an old VB source that made this, no idea where it will be it was from 2001
http://www.idlearts.com/images/particles.wmv
Re: Creating an AVI, frame by frame, without using image fil
Posted: Tue Aug 09, 2011 3:41 am
by Seymour Clufley
This is something I know very little about. I did do a forum search and found old threads, but they were saying the code in them didn't work with newer versions of PB. This is why I created a new thread: I'm hoping somebody has a more up-to-date solution!
Re: Creating an AVI, frame by frame, without using image fil
Posted: Mon Jan 02, 2012 3:34 pm
by Michael Vogel
Seems, you got no news until now...
Maybe the AVI format should be analyzed to see, if generating such a file could be done...
Some information to start:

•
http://www.virtualdub.org/blog/pivot/entry.php?id=25
•
http://www.digitalpreservation.gov/form ... 0059.shtml
Re: Creating an AVI, frame by frame, without using image fil
Posted: Mon Jan 02, 2012 4:34 pm
by IdeasVacuum
On Windows, the obvious choice is to use Microsoft's DLL, but I found that to be much more difficult than expected:
http://www.purebasic.fr/english/viewtop ... 16&t=15466