Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AVI files in Windows

Status
Not open for further replies.

MRANFTL

Programmer
Mar 27, 2001
3
US
I'd like to create a small windows or dos console app in Visual C++ that will open AVI files in a batch and print out each file's properties to a file, like height and width, number of colors, and frames per sec. Does anyone know of the functions and libraries I should use?

Thanks in advance

Mason
 
Hi

You have to make the following "#include" s

#include <vfw.h>
#include <mmsystem.h>
#include <avifmt.h>

// You can open the avi file using the STDAPI call AVIFileOpen();

// First initialize the AVI library.

AVIFileInit();

PAVIFILE avi_file = NULL;
char avifilename[] = &quot;your file path&quot;;
AVIFileOpen(&avi_file, avifilename, OF_READ);

// This will open the AVI file and give u a handle to the file
// in &quot;avi_file&quot;.

// Now create on object of type AVIFILEINFO.

AVIFILEINFO myaviInfo;

// Read the information you want;

AVIFileInfo(&avi_file, &myaviInfo, sizof(myaviInfo));

Now the info structure is filled with the data u want ...

You can also experiment with AVIFileReadData() function.


Hope this helps

abp



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top