bitmaps to avi file c# .Net

12,158

Solution 1

i used avifile wrapper in the past, work nicely

Solution 2

I think you need to use third party libraries

There is AVI File Wrapper or you can use ffmpeg in .NET.

Solution 3

You can check out a simple library for writing AVI files that I've coded to use in my projects. https://sharpavi.codeplex.com/ The sources include a sample screencast app which can be easily adapted to get the bitmaps from files if you need it.

Solution 4

Old question, but I have two tips to achieve it. We're now 2013, but all answers are good from 2004 to 2013. These answers are useful as it seems programmers rarely take the time to work on new encoders solution, and we often rely on the same old DLL and wrappers.

  • Images to MPEG-1

Based on this code, http://www.codeproject.com/Articles/5834/A-C-MPEG1-Image-Compression-Class, you can write a C# Images to MPEG-1 class compatible on any platform using C#.

  • Images to AVI

Convert just an image with 24 bits color (try to use a gradient generator to have the maximum number of colors) to a full frame AVI using ffmpeg. Take an hexadecimal editor, check how the header of the AVI is, and how the single image has been placed in the AVI. Now do it with two images. Check the header. Refer to the specification to know which value use in the header. You'll see you can easily build a Images to AVI from scratch without any wrapper, and use it on any platform.

Both are codes from scratch.

Share:
12,158
y_zyx
Author by

y_zyx

Updated on August 18, 2022

Comments

  • y_zyx
    y_zyx over 1 year

    I have a list of Bitmaps, how can I convert it to avi file using c#.net. Or how can we convert a set of images to video file ?

    I do not need AVI to "Set of images", but I need "Set of Images" to AVI.

  • y_zyx
    y_zyx about 13 years
    @Stecya: Nope. I do not need AVI to Set of images, but I need Set of Images to AVI.
  • Matt Ellen
    Matt Ellen about 13 years
    @Muhammed: One of the things that library does is (to quote) "Create a new video stream from a list of bitmaps", is that not what you want?
  • y_zyx
    y_zyx about 13 years
    @Matt Ellen: Could you please suggest C# code snippet to do the same.