12

how to convert avi file to an jpg's images array using .net , i need to develop a task that will take the avi file and save it as jpg images on another folder

3 Answers3

11

You can do this from the command line with ffmpeg. See this part of the documentation. For example,

ffmpeg -i infile.avi -f image2 image-%03d.jpg

will save all frames from infile.avi as numbered jpegs (image-001.jpg, image-002.jpg,...). You can then use other command line options to get just the frames you want or do some other post processing like resizing or deinterlacing.

You could just create a program in .NET that calls the ffmpeg executable with the right command line and moves the resulting files into the correct place. It would be much easier than trying to use some video library directly.

Jason B
  • 12,835
  • 2
  • 41
  • 43
1

have a look at: http://ffmpegdotnet.codeplex.com/

Looking a bit further, it appears there is no download there, but found this too:

http://www.intuitive.sk/fflib/post/fflib-net-released.aspx

Mark Redman
  • 24,079
  • 20
  • 92
  • 147
0

.NET has no out-of-the-box way of managing audio or video. You'd have to use an external API. DirectX for example can handle .avi files.

Jonas B
  • 2,351
  • 2
  • 18
  • 26