CONTENTS

Home
Projects
  Electronics
  Graphics
  Java
  Java Mobile
  Other Stuff
Resume
Music
Links To Friends
Pictures
About Mike
Contact



AVI Video

Related pages on www.mikekohn.net: SSE Image Processing, GIF, TIFF, BMP/RLE, JPEG, AVI, kunzip, gif2avi, Ringtone Tools, yuv2rgb

Read AVI - AVI Header Dumper

The AVI file format is an audio/video file "container" that can hold raw video, mjpeg, xvid, divx, and many other compressed audio and video formats. This simple little program is an example how to parse AVI files and will dump the AVI headers from a file. I found this program quite useful for debugging AVI files created by programs I wrote and for figuring out what video codecs an AVI file using.

Download

readavi-2007-08-25.tar.gz (Source Code)
readavi-2007-08-25.zip (Source Code)

libkohn_avi - AVI creator

This is a tiny library I made (with zero dependencies) for creating AVI files. It basically has 3 functions:

struct kavi_t *kavi_open(char *filename, int width, int height, char *fourcc, int fps, struct kohn_avi_audio_t *audio);
void kavi_add_frame(struct kavi_t *kavi, unsigned char *buffer, int len);
void kavi_close(struct kavi_t *kavi);

To use this library, simply call kavi_open() to create the avi file, kavi_add_frame() for every raw frame, and kavi_close() to finalize it all. I included a sample program called jpeg2avi which can take a series of jpeg files and create an avi using the mjpeg codec. The mjpeg code of course is just an avi file with a series of jpegs in it. To use this program, if you had a directory full of jpegs with filenames like frame000.jpeg, frame001.jpeg, frame002.jpeg, etc, simply run jpeg2avi like so:

jpeg2avi out.avi /path/to/jpegs/frame%03d.jpeg 15

As of August 13, 2008, this library supports audio as a second stream. This is only useful in the case of mjpeg, raw, or RLE compressed video since those frames can't include audio information. With mpeg and such audio can be mixed into the video. Also, I created a program that can fix broken AVI files using this library. Check the video_fixer_upper page for more info.

This library is distributed under the LGPL license.

Download

libkohn_avi-2008-08-13.tar.gz (Source Code)
libkohn_avi-2008-08-13.zip (Windows Binaries)

Older Versions

libkohn_avi-2008-04-09.tar.gz (Source Code)
libkohn_avi-2008-04-09.zip (Windows Binaries)



Copyright 1997-2010 - Michael Kohn

This page was designed to work with all standard HTML compatible web browsers including Firefox, IE, Safari, and Links.