mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-07-10 04:21:49 +02:00
Fixed bad ffmpeg encoding for 4x/8x, fixed autoenc option, minor ux improv
This commit is contained in:
@@ -103,7 +103,7 @@ namespace Flowframes
|
||||
string presetStr = $"-preset {Config.Get("ffEncPreset")}";
|
||||
string vsyncStr = Config.GetInt("vfrMode") == 0 ? "-vsync 1" : "-vsync 2";
|
||||
string vfrFilename = Path.GetFileName(framesFile);
|
||||
string args = $" {loopStr} {vsyncStr} -f concat -safe 0 -i {vfrFilename} -r {fps.ToString().Replace(",", ".")} -c:v {enc} -crf {crf} {presetStr} {videoEncArgs} -threads {Config.GetInt("ffEncThreads")} -c:a copy {outPath.Wrap()}";
|
||||
string args = $" {loopStr} {vsyncStr} -f concat -r {fps.ToString().Replace(",", ".")} -i {vfrFilename} -c:v {enc} -crf {crf} {presetStr} {videoEncArgs} -threads {Config.GetInt("ffEncThreads")} -c:a copy {outPath.Wrap()}";
|
||||
await AvProcess.RunFfmpeg(args, framesFile.GetParentDir(), AvProcess.LogMode.OnlyLastLine);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Flowframes
|
||||
string presetStr = $"-preset {Config.Get("ffEncPreset")}";
|
||||
string vsyncStr = Config.GetInt("vfrMode") == 0 ? "-vsync 1" : "-vsync 2";
|
||||
string vfrFilename = Path.GetFileName(framesFile);
|
||||
string args = $" {vsyncStr} -f concat -safe 0 -i {vfrFilename} -r {fps.ToString().Replace(",", ".")} -c:v {enc} -crf {crf} {presetStr} {videoEncArgs} -threads {Config.GetInt("ffEncThreads")} -c:a copy {outPath.Wrap()}";
|
||||
string args = $" {vsyncStr} -f concat -r {fps.ToString().Replace(",", ".")} -i {vfrFilename} -c:v {enc} -crf {crf} {presetStr} {videoEncArgs} -threads {Config.GetInt("ffEncThreads")} -c:a copy {outPath.Wrap()}";
|
||||
await AvProcess.RunFfmpeg(args, framesFile.GetParentDir(), AvProcess.LogMode.Hidden);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Flowframes
|
||||
string loopStr = (looptimes > 0) ? $"-stream_loop {looptimes}" : "";
|
||||
string vsyncStr = Config.GetInt("vfrMode") == 0 ? "-vsync 1" : "-vsync 2";
|
||||
string vfrFilename = Path.GetFileName(concatFile);
|
||||
string args = $" {loopStr} {vsyncStr} -f concat -safe 0 -i {vfrFilename} -r {fps.ToString().Replace(",", ".")} -c copy -pix_fmt yuv420p -movflags +faststart {outPath.Wrap()}";
|
||||
string args = $" {loopStr} {vsyncStr} -f concat -r {fps.ToString().Replace(",", ".")} -i {vfrFilename} -c copy -pix_fmt yuv420p -movflags +faststart {outPath.Wrap()}";
|
||||
await AvProcess.RunFfmpeg(args, concatFile.GetParentDir(), AvProcess.LogMode.Hidden);
|
||||
}
|
||||
|
||||
|
||||
@@ -170,8 +170,10 @@ namespace Flowframes
|
||||
|
||||
public static async Task RunAi(string outpath, int targetFrames, int tilesize, AI ai)
|
||||
{
|
||||
if(Config.GetInt("autoEncMode") > 0)
|
||||
if (Config.GetInt("autoEncMode") > 0)
|
||||
currentlyUsingAutoEnc = IOUtils.GetAmountOfFiles(currentFramesPath, false) * lastInterpFactor >= (AutoEncode.chunkSize + AutoEncode.safetyBufferFrames) * 1.1f;
|
||||
else
|
||||
currentlyUsingAutoEnc = false;
|
||||
|
||||
Directory.CreateDirectory(outpath);
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace Flowframes.Main
|
||||
passes = false;
|
||||
}
|
||||
if (!passes)
|
||||
i.Cancel("Invalid settings detected.");
|
||||
i.Cancel("Invalid settings detected.", true);
|
||||
return passes;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Flowframes
|
||||
}
|
||||
|
||||
Process rifePy = OSUtils.NewProcess(!OSUtils.ShowHiddenCmd());
|
||||
AiStarted(rifePy, 3250, "png");
|
||||
AiStarted(rifePy, 3500, "png");
|
||||
rifePy.StartInfo.Arguments = $"{OSUtils.GetCmdArg()} cd /D {PkgUtils.GetPkgFolder(Packages.rifeCuda).Wrap()} & " +
|
||||
$"set CUDA_VISIBLE_DEVICES={Config.Get("torchGpus")} & {Pytorch.GetPyCmd()} {script} {args} --imgformat {InterpolateUtils.lastExt} --output {Paths.interpDir}";
|
||||
Logger.Log($"Running RIFE ({script})...", false);
|
||||
|
||||
Reference in New Issue
Block a user