Fixed mpdecimate not working properly

This commit is contained in:
N00MKRAD 2023-12-21 05:06:51 +01:00
parent 2eff92958f
commit 4576f37ce7
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ namespace Flowframes.Media
string mpStr = deDupe ? ((Config.GetInt(Config.Key.mpdecimateMode) == 0) ? mpDecDef : mpDecAggr) : "";
string filters = FormatUtils.ConcatStrings(new[] { GetPadFilter(), mpStr });
string vf = filters.Length > 2 ? $"-vf {filters}" : "";
string rateArg = (rate.GetFloat() > 0) ? $" -fps_mode cfr -r {rate}" : "-fps_mode passthrough";
string rateArg = (rate.GetFloat() > 0 && !deDupe) ? $" -fps_mode cfr -r {rate}" : "-fps_mode passthrough";
string args = $"{GetTrimArg(true)} -i {inputFile.Wrap()} {GetImgArgs(format, true, alpha)} {rateArg} -frame_pts 1 {vf} {sizeStr} {GetTrimArg(false)} \"{framesDir}/%{Padding.inputFrames}d{format}\"";
LogMode logMode = Interpolate.currentMediaFile.FrameCount > 50 ? LogMode.OnlyLastLine : LogMode.Hidden;
await RunFfmpeg(args, logMode, true);