mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 08:27:44 +01:00
Added frame import support to SBS mode
This commit is contained in:
@@ -365,9 +365,9 @@ namespace Flowframes
|
||||
{
|
||||
stepSelector.Items.Clear();
|
||||
if(Config.GetBool("scnDetect"))
|
||||
stepSelector.Items.AddRange(new string[] { "1) Extract Scene Changes", "2) Extract Video Frames", "3) Run Interpolation", "4) Create Output Video", "5) Cleanup & Reset" });
|
||||
stepSelector.Items.AddRange(new string[] { "1) Extract Scene Changes", "2) Import/Extract Video Frames", "3) Run Interpolation", "4) Create Output Video", "5) Cleanup & Reset" });
|
||||
else
|
||||
stepSelector.Items.AddRange(new string[] { "1) Extract Video Frames", "2) Run Interpolation", "3) Create Output Video", "4) Cleanup & Reset" });
|
||||
stepSelector.Items.AddRange(new string[] { "1) Import/Extract Video Frames", "2) Run Interpolation", "3) Create Output Video", "4) Cleanup & Reset" });
|
||||
stepSelector.SelectedIndex = 0;
|
||||
bool stepByStep = Config.GetInt("processingMode") == 1;
|
||||
stepSelector.Visible = stepByStep;
|
||||
|
||||
@@ -29,13 +29,27 @@ namespace Flowframes.Main
|
||||
InitState();
|
||||
|
||||
if (step.Contains("Extract Scene Changes"))
|
||||
await ExtractSceneChanges();
|
||||
{
|
||||
if (!currentInputIsFrames) // Input is video - extract frames first
|
||||
await ExtractSceneChanges();
|
||||
else
|
||||
InterpolateUtils.ShowMessage("Scene changes can only be extracted from videos, not frames!", "Error");
|
||||
}
|
||||
|
||||
if (step.Contains("Extract Video Frames"))
|
||||
await ExtractVideoFrames();
|
||||
{
|
||||
if (!currentInputIsFrames) // Input is video - extract frames first
|
||||
await ExtractVideoFrames();
|
||||
else
|
||||
await FFmpegCommands.ImportImages(currentInPath, currentFramesPath);
|
||||
}
|
||||
|
||||
if (step.Contains("Run Interpolation"))
|
||||
await DoInterpolate();
|
||||
|
||||
if (step.Contains("Create Output Video"))
|
||||
await CreateOutputVid();
|
||||
|
||||
if (step.Contains("Cleanup"))
|
||||
await Reset();
|
||||
|
||||
@@ -62,6 +76,8 @@ namespace Flowframes.Main
|
||||
currentFramesPath = Path.Combine(currentTempDir, Paths.framesDir);
|
||||
|
||||
currentInterpFramesDir = Path.Combine(currentTempDir, Paths.interpDir);
|
||||
|
||||
currentInputIsFrames = IOUtils.IsPathDirectory(currentInPath);
|
||||
}
|
||||
|
||||
public static async Task ExtractSceneChanges ()
|
||||
|
||||
Reference in New Issue
Block a user