Fixed 1-pass encoding no longer working (outputting to null)

This commit is contained in:
n00mkrad
2021-11-25 22:22:45 +01:00
parent 9978629116
commit b49801d627

View File

@@ -53,7 +53,7 @@ namespace Flowframes.Media
for(int i = 0; i < encArgs.Length; i++)
{
string pre = i == 0 ? "" : $" && ffmpeg {AvProcess.GetFfmpegDefaultArgs()}";
string post = i == 0 ? $"-f null -" : outPath.Wrap();
string post = (i == 0 && encArgs.Length > 1) ? $"-f null -" : outPath.Wrap();
string fs = (!isChunk && outMode == Interpolate.OutMode.VidMp4) ? $"-movflags +faststart" : "";
args += $"{pre} -vsync 0 -r {fps} {inArg} {encArgs[i]} {vf} {GetAspectArg(extraData)} {extraArgs} -threads {Config.GetInt(Config.Key.ffEncThreads)} {fs} {post} ";
}