0

I want to make a app in which user uploads pictures from their hard disc and then my app make a slide show of those pictures and after that the user is enables to download this in form of mp4 video . How can i do this ASP.NET ?

1 Answers1

1

I found this Image sequence to video stream?

The accepted answer is detailed and feels really close to what you are asking for.

edit: I found an example here: http://www.aforgenet.com/framework/docs/html/4ee1742c-44d3-b250-d6aa-90cd2d606611.htm

int width  = 320;
int height = 240;

// create instance of video writer
var writer = new VideoFileWriter( );
// create new video file
writer.Open( "test.avi", width, height, 25, VideoCodec.MPEG4 );
// create a bitmap to save into the video file
var image = new Bitmap( width, height, PixelFormat.Format24bppRgb );
// write 1000 video frames
for ( int i = 0; i < 1000; i++ )
{
    image.SetPixel( i % width, i % height, Color.Red );
    writer.WriteVideoFrame( image );
}
writer.Close( );
Community
  • 1
  • 1
Mark Hagan
  • 506
  • 7
  • 11
  • can u please give me a detail example . please . because i am new-bie – user3275365 Feb 06 '14 at 10:21
  • I got it But now i get into an other problem while using the code you give me ( above) . I add Aforge.Video.ffmpeg.dll in refrences . but when i run the app it gives me error Could not load file or assembly 'AForge.Video.FFMPEG.DLL' or one of its dependencies. The specified module could not be found. Hoe can i solve this problem now ?? – user3275365 Feb 07 '14 at 09:50
  • Instead of direct-referencing the AForge.Video.FFMPEG.dll, use nuGet: Right click your project and click "manage nuget packages". Then, Click "Online -> All" in the left column. Then. Type "AForge" in the search and add the AForge.Video project. It will bring in all of the required dependencies so you don't have to worry about them. Good luck!! – Mark Hagan Feb 10 '14 at 14:08