This commit is contained in:
xiang 2024-11-12 21:56:06 +08:00
parent 2c49896bfb
commit a03660f4d8

View File

@ -107,7 +107,7 @@ namespace VideoConcat
try try
{ {
int k = 1; int k = 1;
for (int i = 1; i < 100; i++) for (int i = 100; i >0; i--)
{ {
var folder = string.Format("{0:D2}", i); var folder = string.Format("{0:D2}", i);
@ -162,16 +162,19 @@ namespace VideoConcat
//int i = 0; //int i = 0;
//string vao = ""; //string vao = "";
List<string> ooootext = []; List<string> ooootext = [];
files.Reverse();
files.ForEach(file => files.ForEach(file =>
{ {
//#file = System.Web.HttpUtility.UrlEncode(file);
ooootext.Add($"file '{file}'"); ooootext.Add($"file '{file}'");
}); });
var random = new Random(); var random = new Random();
string tmpConcatFile = $"{outPut}\\{Guid.NewGuid()}{random.Next(100000, 999999)}.aaa"; string tmpConcatFile = $"{outPut}\\{Guid.NewGuid()}{random.Next(100000, 999999)}.aaa";
// 也可以指定编码方式 // 也可以指定编码方式
File.WriteAllLines(tmpConcatFile, ooootext, Encoding.ASCII); //File.WriteAllLines(tmpConcatFile, ooootext, Encoding.UTF8);
File.WriteAllText(tmpConcatFile, string.Join("\n", [.. ooootext]), new System.Text.UTF8Encoding(false));