mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Added frame import support to SBS mode
This commit is contained in:
@@ -365,9 +365,9 @@ namespace Flowframes
|
|||||||
{
|
{
|
||||||
stepSelector.Items.Clear();
|
stepSelector.Items.Clear();
|
||||||
if(Config.GetBool("scnDetect"))
|
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
|
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;
|
stepSelector.SelectedIndex = 0;
|
||||||
bool stepByStep = Config.GetInt("processingMode") == 1;
|
bool stepByStep = Config.GetInt("processingMode") == 1;
|
||||||
stepSelector.Visible = stepByStep;
|
stepSelector.Visible = stepByStep;
|
||||||
|
|||||||
@@ -29,13 +29,27 @@ namespace Flowframes.Main
|
|||||||
InitState();
|
InitState();
|
||||||
|
|
||||||
if (step.Contains("Extract Scene Changes"))
|
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"))
|
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"))
|
if (step.Contains("Run Interpolation"))
|
||||||
await DoInterpolate();
|
await DoInterpolate();
|
||||||
|
|
||||||
if (step.Contains("Create Output Video"))
|
if (step.Contains("Create Output Video"))
|
||||||
await CreateOutputVid();
|
await CreateOutputVid();
|
||||||
|
|
||||||
if (step.Contains("Cleanup"))
|
if (step.Contains("Cleanup"))
|
||||||
await Reset();
|
await Reset();
|
||||||
|
|
||||||
@@ -62,6 +76,8 @@ namespace Flowframes.Main
|
|||||||
currentFramesPath = Path.Combine(currentTempDir, Paths.framesDir);
|
currentFramesPath = Path.Combine(currentTempDir, Paths.framesDir);
|
||||||
|
|
||||||
currentInterpFramesDir = Path.Combine(currentTempDir, Paths.interpDir);
|
currentInterpFramesDir = Path.Combine(currentTempDir, Paths.interpDir);
|
||||||
|
|
||||||
|
currentInputIsFrames = IOUtils.IsPathDirectory(currentInPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task ExtractSceneChanges ()
|
public static async Task ExtractSceneChanges ()
|
||||||
|
|||||||
Reference in New Issue
Block a user