Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a video out of a set of images [closed]

Tags:

c#

image

video

avi

I've been looking much time for creating a video(.avi file) from images using a C# code,

Is there any library that maintain the video creating? I've been looking through AviFileWriter library, but that library seems to be too fixed since I need to add some transitions and other elements.

So how can I fulfill my needs using C#? I wouldn't care if the coding is complex abit.

like image 592
idish Avatar asked Aug 19 '12 07:08

idish


People also ask

What do you call a video with still images?

A still image film, also called a picture movie, is a film that consists primarily or entirely of still images rather than moving images, forgoing the illusion of motion either for aesthetic or practical reasons.


1 Answers

here a c# project with main AVI function http://www.codeproject.com/Articles/7388/A-Simple-C-Wrapper-for-the-AviFile-Library

here use of VideoStream to create a video making frames from bmp file

 //load the first image
Bitmap bitmap = (Bitmap)Image.FromFile(txtFileNames.Lines[0]);
//create a new AVI file
AviManager aviManager = 
    new AviManager(@"..\..\testdata\new.avi", false);
//add a new video stream and one frame to the new file
VideoStream aviStream = 
    aviManager.AddVideoStream(true, 2, bitmap);

Bitmap bitmap;
int count = 0;
for(int n=1; n<txtFileNames.Lines.Length; n++){
    if(txtFileNames.Lines[n].Trim().Length > 0){
        bitmap = 
           (Bitmap)Bitmap.FromFile(txtFileNames.Lines[n]);
        aviStream.AddFrame(bitmap);
        bitmap.Dispose();
        count++;
    }
}
aviManager.Close();
like image 194
Hassan Boutougha Avatar answered Sep 18 '22 11:09

Hassan Boutougha