Fix FramesToVideo and ConcatVideos

This commit is contained in:
n00mkrad
2023-01-31 12:03:31 +01:00
parent db2f931fa5
commit 30a423e9ec
2 changed files with 2 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ namespace Flowframes
IoUtils.RenameExistingFile(outPath); IoUtils.RenameExistingFile(outPath);
string loopStr = (looptimes > 0) ? $"-stream_loop {looptimes}" : ""; string loopStr = (looptimes > 0) ? $"-stream_loop {looptimes}" : "";
string vfrFilename = Path.GetFileName(concatFile); string vfrFilename = Path.GetFileName(concatFile);
string args = $" {loopStr} -fps_mode cfr -f concat -i {vfrFilename} -c copy -movflags +faststart -fflags +genpts {outPath.Wrap()}"; string args = $" {loopStr} -f concat -i {vfrFilename} -fps_mode cfr -c copy -movflags +faststart -fflags +genpts {outPath.Wrap()}";
await RunFfmpeg(args, concatFile.GetParentDir(), LogMode.Hidden); await RunFfmpeg(args, concatFile.GetParentDir(), LogMode.Hidden);
} }

View File

@@ -39,7 +39,7 @@ namespace Flowframes.Media
{ {
string pre = i == 0 ? "" : $" && ffmpeg {AvProcess.GetFfmpegDefaultArgs()}"; string pre = i == 0 ? "" : $" && ffmpeg {AvProcess.GetFfmpegDefaultArgs()}";
string post = (i == 0 && encArgs.Length > 1) ? $"-f null -" : outPath.Wrap(); string post = (i == 0 && encArgs.Length > 1) ? $"-f null -" : outPath.Wrap();
args += $"{pre} {await GetFfmpegExportArgsIn(fps, itsScale)} {inArg} {encArgs[i]} {GetFfmpegExportArgsOut(resampleFps, extraData, settings, isChunk)} {post} "; args += $"{pre} {await GetFfmpegExportArgsIn(fps, itsScale)} {inArg} {encArgs[i]} {await GetFfmpegExportArgsOut(resampleFps, extraData, settings, isChunk)} {post} ";
} }
await RunFfmpeg(args, framesFile.GetParentDir(), logMode, !isChunk); await RunFfmpeg(args, framesFile.GetParentDir(), logMode, !isChunk);