mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-04-30 19:39:07 -05:00
fixing video encoding nodes after parameters change
This commit is contained in:
Binary file not shown.
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user