mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-22 19:29:24 +01:00
Fixed video utils progress bar being stuck at 1 00%
This commit is contained in:
@@ -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"))
|
if (Config.GetBool("scnDetect"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ namespace Flowframes.UI
|
|||||||
await FFmpegCommands.ExtractAudio(videoPath, Path.Combine(outPath, "audio"));
|
await FFmpegCommands.ExtractAudio(videoPath, Path.Combine(outPath, "audio"));
|
||||||
Program.mainForm.SetWorking(false);
|
Program.mainForm.SetWorking(false);
|
||||||
Logger.Log("Done.");
|
Logger.Log("Done.");
|
||||||
|
Program.mainForm.SetProgress(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task LoopVideo (string inputFile, ComboBox loopTimes)
|
public static async Task LoopVideo (string inputFile, ComboBox loopTimes)
|
||||||
@@ -35,6 +36,7 @@ namespace Flowframes.UI
|
|||||||
Logger.Log("Lopping video " + times + "x...", true);
|
Logger.Log("Lopping video " + times + "x...", true);
|
||||||
await FFmpegCommands.LoopVideo(inputFile, times, false);
|
await FFmpegCommands.LoopVideo(inputFile, times, false);
|
||||||
Logger.Log("Done", true);
|
Logger.Log("Done", true);
|
||||||
|
Program.mainForm.SetProgress(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task ChangeSpeed(string inputFile, ComboBox speed)
|
public static async Task ChangeSpeed(string inputFile, ComboBox speed)
|
||||||
@@ -45,6 +47,7 @@ namespace Flowframes.UI
|
|||||||
Logger.Log("Creating video with " + speed + "% speed...", true);
|
Logger.Log("Creating video with " + speed + "% speed...", true);
|
||||||
await FFmpegCommands.ChangeSpeed(inputFile, speedFloat, false);
|
await FFmpegCommands.ChangeSpeed(inputFile, speedFloat, false);
|
||||||
Logger.Log("Done", true);
|
Logger.Log("Done", true);
|
||||||
|
Program.mainForm.SetProgress(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task Convert(string inputFile, ComboBox crfBox)
|
public static async Task Convert(string inputFile, ComboBox crfBox)
|
||||||
@@ -58,6 +61,7 @@ namespace Flowframes.UI
|
|||||||
else
|
else
|
||||||
await FFmpegCommands.Encode(inputFile, "libx264", "copy", crf); // Copy audio if input is MP4
|
await FFmpegCommands.Encode(inputFile, "libx264", "copy", crf); // Copy audio if input is MP4
|
||||||
Logger.Log("Done", true);
|
Logger.Log("Done", true);
|
||||||
|
Program.mainForm.SetProgress(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool InputIsValid (string inPath)
|
static bool InputIsValid (string inPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user