Rtrggf commited on
Commit
5db1549
·
1 Parent(s): 1081d91
Files changed (1) hide show
  1. ai +21 -0
ai ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Drawing;
3
+ using AForge.Video.FFMPEG;
4
+
5
+ class Program
6
+ {
7
+ static void Main(string[] args)
8
+ {
9
+ var videoWriter = new VideoFileWriter();
10
+ videoWriter.Open("output.mp4", 640, 480, 25, VideoCodec.MPEG4);
11
+
12
+ for (int i = 0; i < 10; i++)
13
+ {
14
+ Bitmap image = (Bitmap)Image.FromFile($"image{i}.jpg");
15
+ videoWriter.WriteVideoFrame(image);
16
+ image.Dispose();
17
+ }
18
+
19
+ videoWriter.Close();
20
+ }
21
+ }