Click here to Skip to main content
14,740,854 members
Articles » Multimedia » Audio and Video » Video
Article
Posted 19 May 2003

Stats

202K views
4.1K downloads
67 bookmarked

A simple interface to the Video for Windows API for creating AVI movies from individual images

Rate me:
Please Sign up or sign in to vote.
4.21/5 (17 votes)
19 May 2003
A simple interface to the Video for Windows API for creating AVI movies from individual images.

Introduction

This article describes a simple interface to the Video for Windows API for creating AVI movies from individual images. The idea for this code comes from a Microsoft sample that was very unfriendly to use. With that in mind, I created this code to easily create an AVI from individual images.

The steps are:

  1. include "aviUtil.h".
  2. Call START_AVI("foo.avi"); // you must include the .avi extention.
  3. 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.
  4. Call STOP_AVI(); //this closes the avi and video.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Rod VanAmburgh
Web Developer
United States United States
I enjoy working with C#, Java, Perl and C++

Comments and Discussions

 
QuestionIs this AVI 1.0 or 2.0? Pin
teroni18-Nov-13 18:34
Memberteroni18-Nov-13 18:34 
AnswerRe: Is this AVI 1.0 or 2.0? Pin
toann4-Oct-18 12:04
Membertoann4-Oct-18 12:04 
QuestionWorks Great! I modified for no MFC... Pin
John Slagel30-Oct-13 8:24
MemberJohn Slagel30-Oct-13 8:24 
AnswerRe: Works Great! I modified for no MFC... Pin
Member 311299416-Sep-15 22:02
MemberMember 311299416-Sep-15 22:02 
PraiseRe: Works Great! I modified for no MFC... Pin
Aaron Balint4-Apr-17 15:30
MemberAaron Balint4-Apr-17 15:30 
AnswerRe: Works Great! I modified for no MFC... Pin
Member 1313934818-Apr-18 10:59
MemberMember 1313934818-Apr-18 10:59 
Generalhelp me Pin
sukumarvenkata18-May-08 20:21
Membersukumarvenkata18-May-08 20:21 
GeneralThanks! Pin
mmesser26-Jun-07 16:59
Membermmesser26-Jun-07 16:59 
QuestionLibraries Pin
Ocean_Blue7-Sep-06 15:30
MemberOcean_Blue7-Sep-06 15:30 
QuestionPlease show me how to create a whole AVI video from lots of BMP images?Thanks. Pin
02921-Aug-06 19:00
Member02921-Aug-06 19:00 
QuestionTop down dib Pin
pmisik21-Aug-06 3:42
Memberpmisik21-Aug-06 3:42 
GeneralIf you want to write avi files many time ! Pin
zerong26-May-06 7:12
Memberzerong26-May-06 7:12 
GeneralError link sample test application !!! Pin
solon1211-May-06 21:52
Membersolon1211-May-06 21:52 
GeneralFeedback Pin
Vipin Aravind18-Feb-06 20:52
MemberVipin Aravind18-Feb-06 20:52 
Questionneed help Pin
krishnachn24-Oct-05 19:04
Memberkrishnachn24-Oct-05 19:04 
AnswerRe: need help Pin
Rod VanAmburgh25-Oct-05 17:32
MemberRod VanAmburgh25-Oct-05 17:32 
Generalvideo from tiff images series Pin
dagim12-Oct-05 6:04
Memberdagim12-Oct-05 6:04 
GeneralI need to create an avi from bitmap in Vb.Net Pin
AbramoBarbaresi31-May-05 8:17
MemberAbramoBarbaresi31-May-05 8:17 
GeneralRe: I need to create an avi from bitmap in Vb.Net Pin
Rod VanAmburgh2-Jun-05 18:18
MemberRod VanAmburgh2-Jun-05 18:18 
GeneralGive me the complete source code please Pin
Rasik200519-Mar-05 1:00
MemberRasik200519-Mar-05 1:00 
GeneralRe: Give me the complete source code please Pin
Rod VanAmburgh19-Mar-05 14:24
MemberRod VanAmburgh19-Mar-05 14:24 
QuestionADD_FRAME_FROM_DIB_TO_AVI ? Pin
william_li15-Nov-04 20:49
Memberwilliam_li15-Nov-04 20:49 
QuestionADD_FRAME_FROM_ .. buffer? Pin
mound15-Jun-04 9:13
Membermound15-Jun-04 9:13 
AnswerRe: ADD_FRAME_FROM_ .. buffer? Pin
Rod VanAmburgh15-Jun-04 16:32
MemberRod VanAmburgh15-Jun-04 16:32 
GeneralRe: ADD_FRAME_FROM_ .. buffer? Pin
mound16-Jun-04 9:50
Membermound16-Jun-04 9:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.