Renamed FrameTiming to FrameOrder as VFR is no longer used

This commit is contained in:
N00MKRAD
2021-01-14 20:32:42 +01:00
parent cd20921fad
commit 972bf3ecd3
3 changed files with 6 additions and 6 deletions

View File

@@ -43,7 +43,7 @@ namespace Flowframes
if (!sceneDetect) Logger.Log("Extracting video frames from input video..."); if (!sceneDetect) Logger.Log("Extracting video frames from input video...");
string sizeStr = (size.Width > 1 && size.Height > 1) ? $"-s {size.Width}x{size.Height}" : ""; string sizeStr = (size.Width > 1 && size.Height > 1) ? $"-s {size.Width}x{size.Height}" : "";
IOUtils.CreateDir(frameFolderPath); IOUtils.CreateDir(frameFolderPath);
string timecodeStr = timecodes ? $"-copyts -r {FrameTiming.timebase} -frame_pts true" : "-copyts -frame_pts true"; string timecodeStr = timecodes ? $"-copyts -r {FrameOrder.timebase} -frame_pts true" : "-copyts -frame_pts true";
string scnDetect = sceneDetect ? $"\"select='gt(scene,{Config.GetFloatString("scnDetectValue")})'\"" : ""; string scnDetect = sceneDetect ? $"\"select='gt(scene,{Config.GetFloatString("scnDetectValue")})'\"" : "";
string mpStr = deDupe ? ((Config.GetInt("mpdecimateMode") == 0) ? mpDecDef : mpDecAggr) : ""; string mpStr = deDupe ? ((Config.GetInt("mpdecimateMode") == 0) ? mpDecDef : mpDecAggr) : "";
string filters = FormatUtils.ConcatStrings(new string[] { scnDetect, mpStr } ); string filters = FormatUtils.ConcatStrings(new string[] { scnDetect, mpStr } );

View File

@@ -12,25 +12,25 @@ using System.Threading.Tasks;
namespace Flowframes.Main namespace Flowframes.Main
{ {
class FrameTiming class FrameOrder
{ {
public enum Mode { CFR, VFR } public enum Mode { CFR, VFR }
public static int timebase = 10000; public static int timebase = 10000;
public static async Task CreateTimecodeFiles(string framesPath, Mode mode, bool loopEnabled, int times, bool noTimestamps) public static async Task CreateTimecodeFiles(string framesPath, Mode mode, bool loopEnabled, int times, bool noTimestamps)
{ {
Logger.Log("Generating timecodes..."); Logger.Log("Generating frame order information...");
try try
{ {
if (mode == Mode.VFR) if (mode == Mode.VFR)
await CreateTimecodeFile(framesPath, loopEnabled, times, false, noTimestamps); await CreateTimecodeFile(framesPath, loopEnabled, times, false, noTimestamps);
if (mode == Mode.CFR) if (mode == Mode.CFR)
await CreateEncFile(framesPath, loopEnabled, times, false); await CreateEncFile(framesPath, loopEnabled, times, false);
Logger.Log($"Generating timecodes... Done.", false, true); Logger.Log($"Generating frame order information... Done.", false, true);
} }
catch (Exception e) catch (Exception e)
{ {
Logger.Log($"Error generating timecodes: {e.Message}"); Logger.Log($"Error generating frame order information: {e.Message}");
} }
} }

View File

@@ -133,7 +133,7 @@ namespace Flowframes
if (canceled) return; if (canceled) return;
bool useTimestamps = Config.GetInt("timingMode") == 1; // TODO: Auto-Disable timestamps if input frames are sequential, not timestamped bool useTimestamps = Config.GetInt("timingMode") == 1; // TODO: Auto-Disable timestamps if input frames are sequential, not timestamped
await FrameTiming.CreateTimecodeFiles(current.framesFolder, FrameTiming.Mode.CFR, Config.GetBool("enableLoop"), current.interpFactor, !useTimestamps); await FrameOrder.CreateTimecodeFiles(current.framesFolder, FrameOrder.Mode.CFR, Config.GetBool("enableLoop"), current.interpFactor, !useTimestamps);
if (canceled) return; if (canceled) return;