 |
| How to extract frames from AVI files |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
| Before you begin: |
 |
This example presents the AviBrowser class. This class can open AVI file and convert its frames into bitmap files. The AviBrowser object is shown used as a control on FoxPro form. For that reason, it is subclassed from the Image control.
 |
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 8513 bytes Created: 2005-04-05 08:11:41 Modified: 2011-12-10 09:20:22 Visits in 7 days: 124 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
The AVIStreamGetFrame returns the address of a decompressed video frame. It points to a globally allocated memory block. The block contains already populated BITMAPINFOHEADER structure followed by optional color table and the binary data.
Practically, this is a bitmap file. All you have to do is to populate the BITMAPFILEHEADER structure and add it on top of the block. Then save the result to a file with "DIB" or "BMP" extension.
* * *
There is an issue not answered yet: the AVIStreamGetFrameOpen returns an error for some AVI files. Otherwise these are normal AVI files. I`m looking what can be done...
* * *
Read Saving a Control Image to a Bitmap File article written by Geoff Schwab. It explains the bitmap structure in clear and simple words. |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|