Welcome to MSDN Blogs Sign in | Join | Help

Creating AVI files from Bitmaps with C#

Yesterday, I needed to take a set of 16 bitmap frames and assemble them into a movie (AVI or animated gif). The solution came via a fantasic article on CodeProject:

A Simple C# Wrapper for the AviFile Library
http://www.codeproject.com/cs/media/aviFileWrapper.asp 
by Corinna John

This is great work. The article is well written and the code is easy to understand. I was able to take the supplied demo application (that does a lot of different things with AVI files) and within five minutes create my a simply WinForms app that assembles bitmaps into an AVI File.

At the author's site (  http://www.binary-universe.net/ ) you can learn more about AVI files and steganography.

 

 

Published Friday, April 28, 2006 9:27 AM by saveenr

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Creating AVI files from Bitmaps with C#

Be careful with that code. I've been using it, and I've discovered that it sometimes creates corrupted AVI files: they play OK in Windows Media Player, but in applications that don't use DirectShow -- such as IrfanView or VirtualDub, or even the same C# library -- the frames come out misaligned.

Thursday, January 24, 2008 8:31 PM by Jesse

# re: Creating AVI files from Bitmaps with C#

Any idea what is causing the corrupted AVI files?

Thursday, January 31, 2008 2:42 AM by Lee

# re: Creating AVI files from Bitmaps with C#

I created a program that displays bitmap in a picturebox and create an avi files using the bitmap displays. However, the picturebox display and the avi file created flipped with the vertical axis. Then i discovered that in videostream.cs code the following line seem to flip the display and the avi file- bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);

But when i delete this line, the avi file display is inverted.

Any idea how to fix this problem?

Thanks

Monday, March 03, 2008 9:39 PM by Pie

# re: Creating AVI files from Bitmaps with C#

How can i create avi file in c#

Wednesday, September 09, 2009 12:52 PM by hossein_q

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker