fixing video encoding nodes after parameters change

This commit is contained in:
reven
2022-01-30 22:15:15 +13:00
parent ad4fe7bbe5
commit 05eff9b237
3 changed files with 11 additions and 4 deletions
Binary file not shown.
+2 -2
View File
@@ -140,8 +140,8 @@ namespace FileFlows.VideoNodes
List<string> ffArgs = new List<string>();
ffArgs.AddRange((encodeVideoParameters?.EmptyAsNull() ?? copyVideoStream).Split(" "));
ffArgs.AddRange((encodeAudioParameters?.EmptyAsNull() ?? copyAudioStream).Split(" "));
ffArgs.AddRange((encodeVideoParameters?.EmptyAsNull() ?? copyVideoStream).Split(" ").Where(x => string.IsNullOrEmpty(x.Trim()) == false).Select(x => x.Trim()).ToArray());
ffArgs.AddRange((encodeAudioParameters?.EmptyAsNull() ?? copyAudioStream).Split(" ").Where(x => string.IsNullOrEmpty(x.Trim()) == false).Select(x => x.Trim()).ToArray());
TotalTime = videoInfo.VideoStreams[0].Duration;
args.Logger.ILog("### Total Time: " + TotalTime);
+9 -2
View File
@@ -89,13 +89,20 @@ namespace FileFlows.VideoNodes
return -1;
string codec = CheckVideoCodec(ffmpegExe, VideoCodec);
List<string> ffArgs = new List<string>()
{
"-vf", $"scale={Resolution}:flags=lanczos",
"-c:v", "codec"
"-c:v"
};
string codec = CheckVideoCodec(ffmpegExe, VideoCodec);
foreach (string c in codec.Split(" "))
{
if (string.IsNullOrWhiteSpace(c.Trim()))
continue;
ffArgs.Add(c.Trim());
}
if (Encode(args, ffmpegExe, ffArgs, Extension) == false)
return -1;