diff --git a/Code/Main/AutoEncode.cs b/Code/Main/AutoEncode.cs index aae97f0..dc364f8 100644 --- a/Code/Main/AutoEncode.cs +++ b/Code/Main/AutoEncode.cs @@ -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 { List frameLinesToEncode = aiRunning ? unencodedFrameLines.Take(chunkSize).ToList() : unencodedFrameLines; // Take all remaining frames if process is done - string lastOfChunk = Path.Combine(interpFramesPath, interpFramesLines[frameLinesToEncode.Last()]); if (!File.Exists(lastOfChunk)) diff --git a/Code/Main/FrameOrder.cs b/Code/Main/FrameOrder.cs index ffc8546..38c5fc8 100644 --- a/Code/Main/FrameOrder.cs +++ b/Code/Main/FrameOrder.cs @@ -19,8 +19,12 @@ namespace Flowframes.Main public static async Task CreateFrameOrderFile(string framesPath, bool loopEnabled, float times) { Logger.Log("Generating frame order information..."); + try { + foreach (FileInfo file in IOUtils.GetFileInfosSorted(framesPath.GetParentDir(), false, $"{Paths.frameOrderPrefix}*.*")) + file.Delete(); + benchmark.Restart(); await CreateEncFile(framesPath, loopEnabled, times, false); Logger.Log($"Generating frame order information... Done.", false, true); diff --git a/Code/Media/FfmpegAudioAndMetadata.cs b/Code/Media/FfmpegAudioAndMetadata.cs index 8a400a9..72ef8c3 100644 --- a/Code/Media/FfmpegAudioAndMetadata.cs +++ b/Code/Media/FfmpegAudioAndMetadata.cs @@ -71,9 +71,10 @@ namespace Flowframes.Media } 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); - - Logger.Log($"Extracted {subtitleTracks.Count} subtitle tracks from the input video.".Replace(" 0 ", " no "), false, Logger.GetLastLine().Contains(msg)); + } } catch (Exception e) {