mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-23 19:59:31 +01:00
Delete old vfr files whenever making a new one
This commit is contained in:
@@ -78,7 +78,6 @@ namespace Flowframes.Main
|
|||||||
if (unencodedFrameLines.Count > 0 && (unencodedFrameLines.Count >= (chunkSize + safetyBufferFrames) || !aiRunning)) // Encode every n frames, or after process has exited
|
if (unencodedFrameLines.Count > 0 && (unencodedFrameLines.Count >= (chunkSize + safetyBufferFrames) || !aiRunning)) // Encode every n frames, or after process has exited
|
||||||
{
|
{
|
||||||
List<int> frameLinesToEncode = aiRunning ? unencodedFrameLines.Take(chunkSize).ToList() : unencodedFrameLines; // Take all remaining frames if process is done
|
List<int> frameLinesToEncode = aiRunning ? unencodedFrameLines.Take(chunkSize).ToList() : unencodedFrameLines; // Take all remaining frames if process is done
|
||||||
|
|
||||||
string lastOfChunk = Path.Combine(interpFramesPath, interpFramesLines[frameLinesToEncode.Last()]);
|
string lastOfChunk = Path.Combine(interpFramesPath, interpFramesLines[frameLinesToEncode.Last()]);
|
||||||
|
|
||||||
if (!File.Exists(lastOfChunk))
|
if (!File.Exists(lastOfChunk))
|
||||||
|
|||||||
@@ -19,8 +19,12 @@ namespace Flowframes.Main
|
|||||||
public static async Task CreateFrameOrderFile(string framesPath, bool loopEnabled, float times)
|
public static async Task CreateFrameOrderFile(string framesPath, bool loopEnabled, float times)
|
||||||
{
|
{
|
||||||
Logger.Log("Generating frame order information...");
|
Logger.Log("Generating frame order information...");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
foreach (FileInfo file in IOUtils.GetFileInfosSorted(framesPath.GetParentDir(), false, $"{Paths.frameOrderPrefix}*.*"))
|
||||||
|
file.Delete();
|
||||||
|
|
||||||
benchmark.Restart();
|
benchmark.Restart();
|
||||||
await CreateEncFile(framesPath, loopEnabled, times, false);
|
await CreateEncFile(framesPath, loopEnabled, times, false);
|
||||||
Logger.Log($"Generating frame order information... Done.", false, true);
|
Logger.Log($"Generating frame order information... Done.", false, true);
|
||||||
|
|||||||
@@ -71,9 +71,10 @@ namespace Flowframes.Media
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (subtitleTracks.Count > 0)
|
if (subtitleTracks.Count > 0)
|
||||||
|
{
|
||||||
|
Logger.Log($"Extracted {subtitleTracks.Count} subtitle tracks from the input video.", false, Logger.GetLastLine().Contains(msg));
|
||||||
Utils.ContainerSupportsSubs(Utils.GetExt(outMode), true);
|
Utils.ContainerSupportsSubs(Utils.GetExt(outMode), true);
|
||||||
|
}
|
||||||
Logger.Log($"Extracted {subtitleTracks.Count} subtitle tracks from the input video.".Replace(" 0 ", " no "), false, Logger.GetLastLine().Contains(msg));
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user