mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-05-07 03:39:09 -05:00
FF-1227 - tweaking hw check to use ss instead of -vframes
This commit is contained in:
@@ -291,7 +291,10 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
|
||||
{
|
||||
"-i", localFile,
|
||||
"-frames:v", "10",
|
||||
testFile
|
||||
"-ss", "1",
|
||||
// instead of file output to null
|
||||
"-f", "null", "-"
|
||||
// testFile
|
||||
});
|
||||
|
||||
var result = args.Execute(new ExecuteArgs
|
||||
@@ -311,7 +314,7 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
|
||||
}
|
||||
}
|
||||
|
||||
args.Logger?.ILog("No hardware decoding availble");
|
||||
args.Logger?.ILog("No hardware decoding available");
|
||||
return new string[] { };
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -55,7 +55,6 @@ public class VideoHasErrors: VideoNode
|
||||
if (result.NoErrors)
|
||||
return 2;
|
||||
|
||||
args.Logger.WLog(result.Log);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -115,12 +114,28 @@ public class VideoHasErrors: VideoNode
|
||||
StartInfo = processStartInfo
|
||||
};
|
||||
|
||||
var line = "Executing: " + (ffmpegPath.IndexOf(" ") > 0 ? "\"" + ffmpegPath + "\"" : ffmpegPath) + " " +
|
||||
string.Join(" ",
|
||||
processStartInfo.ArgumentList.Select(x => x.IndexOf(" ") > 0 ? "\"" + x + "\"" : x)
|
||||
.ToArray());
|
||||
args.Logger?.ILog(new string('-', line.Length));
|
||||
args.Logger?.ILog(line);
|
||||
args.Logger?.ILog(new string('-', line.Length));
|
||||
|
||||
process.Start();
|
||||
string output = process.StandardError.ReadToEnd();
|
||||
process.WaitForExit();
|
||||
|
||||
if (output.Contains("error"))
|
||||
{
|
||||
args.Logger?.ILog("Errors detected in file");
|
||||
args.Logger?.WLog(output);
|
||||
return (false, output);
|
||||
}
|
||||
|
||||
args.Logger?.ILog("No errors detected");
|
||||
if(string.IsNullOrWhiteSpace(output) == false)
|
||||
args.Logger?.ILog(output);
|
||||
|
||||
return (true, string.Empty);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user