Fixed video utils progress bar being stuck at 1 00%

This commit is contained in:
N00MKRAD
2021-01-30 14:46:54 +01:00
parent 2527e6eeb1
commit 1a6218117e
2 changed files with 5 additions and 1 deletions

View File

@@ -78,7 +78,7 @@ namespace Flowframes
}
}
public static async Task ExtractFrames(string inPath, string outPath, bool alpha, bool allowSceneDetect = true, bool extractAudio = true)
public static async Task ExtractFrames(string inPath, string outPath, bool alpha, bool extractAudio = true)
{
if (Config.GetBool("scnDetect"))
{

View File

@@ -25,6 +25,7 @@ namespace Flowframes.UI
await FFmpegCommands.ExtractAudio(videoPath, Path.Combine(outPath, "audio"));
Program.mainForm.SetWorking(false);
Logger.Log("Done.");
Program.mainForm.SetProgress(0);
}
public static async Task LoopVideo (string inputFile, ComboBox loopTimes)
@@ -35,6 +36,7 @@ namespace Flowframes.UI
Logger.Log("Lopping video " + times + "x...", true);
await FFmpegCommands.LoopVideo(inputFile, times, false);
Logger.Log("Done", true);
Program.mainForm.SetProgress(0);
}
public static async Task ChangeSpeed(string inputFile, ComboBox speed)
@@ -45,6 +47,7 @@ namespace Flowframes.UI
Logger.Log("Creating video with " + speed + "% speed...", true);
await FFmpegCommands.ChangeSpeed(inputFile, speedFloat, false);
Logger.Log("Done", true);
Program.mainForm.SetProgress(0);
}
public static async Task Convert(string inputFile, ComboBox crfBox)
@@ -58,6 +61,7 @@ namespace Flowframes.UI
else
await FFmpegCommands.Encode(inputFile, "libx264", "copy", crf); // Copy audio if input is MP4
Logger.Log("Done", true);
Program.mainForm.SetProgress(0);
}
static bool InputIsValid (string inPath)