mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-25 04:39:25 +01:00
Batch Processing fixes and improvements
This commit is contained in:
@@ -109,6 +109,7 @@ namespace Flowframes
|
||||
if (entry.Contains(" fps") && !entry.Contains("Input ")) // Avoid reading FPS from the filename, in case filename contains "fps"
|
||||
{
|
||||
string num = entry.Replace(" fps", "").Trim().Replace(",", ".");
|
||||
Logger.Log($"Float FPS from ffmpeg: {num.GetFloat()}", true, false, "ffmpeg");
|
||||
ffmpegFps = new Fraction(num.GetFloat());
|
||||
}
|
||||
}
|
||||
@@ -118,10 +119,14 @@ namespace Flowframes
|
||||
Logger.Log("GetFramerate ffmpeg Error: " + ffmpegEx.Message, true, false);
|
||||
}
|
||||
|
||||
if(preferFfmpeg)
|
||||
Logger.Log($"ffmpegFps.GetFloat() = {ffmpegFps.GetFloat()}", true, false, "ffmpeg");
|
||||
|
||||
if (preferFfmpeg)
|
||||
{
|
||||
Logger.Log($"preferring ffmpeg");
|
||||
|
||||
if (ffmpegFps.GetFloat() > 0)
|
||||
return ffmpegFps;
|
||||
{ Logger.Log($"returning {ffmpegFps}"); return ffmpegFps; }
|
||||
else
|
||||
return ffprobeFps;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Flowframes.Media
|
||||
public static async Task VideoToFrames(string inputFile, string framesDir, bool alpha, Fraction rate, bool deDupe, bool delSrc, Size size, string format)
|
||||
{
|
||||
Logger.Log("Extracting video frames from input video...");
|
||||
Logger.Log($"VideoToFrames() - Alpha: {alpha} - Size: {size}", true, false, "ffmpeg");
|
||||
Logger.Log($"VideoToFrames() - Alpha: {alpha} - Rate: {rate} - Size: {size} - Format: {format}", true, false, "ffmpeg");
|
||||
string sizeStr = (size.Width > 1 && size.Height > 1) ? $"-s {size.Width}x{size.Height}" : "";
|
||||
IOUtils.CreateDir(framesDir);
|
||||
string mpStr = deDupe ? ((Config.GetInt(Config.Key.mpdecimateMode) == 0) ? mpDecDef : mpDecAggr) : "";
|
||||
|
||||
Reference in New Issue
Block a user