mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-05-03 01:19:10 -05:00
added fallback for intel hd encoding to video encode node
This commit is contained in:
@@ -87,6 +87,20 @@ namespace VideoNodes.Tests
|
||||
node.SetArgs(args);
|
||||
bool result = node.CanProcessEncoder(ffmpeg, "hevc_nvenc -preset hq");
|
||||
|
||||
Assert.IsTrue(result);
|
||||
}
|
||||
[TestMethod]
|
||||
public void VideoInfoTest_CanEncodeIntel()
|
||||
{
|
||||
const string file = @"D:\videos\unprocessed\Bourne.mkv";
|
||||
const string ffmpeg = @"C:\utils\ffmpeg\ffmpeg.exe";
|
||||
var args = new FileFlows.Plugin.NodeParameters(file, new TestLogger());
|
||||
//args.Process = new FileFlows.Plugin.ProcessHelper(args.Logger);
|
||||
|
||||
var node = new VideoEncode();
|
||||
node.SetArgs(args);
|
||||
bool result = node.CanProcessEncoder(ffmpeg, "h264_qsv");
|
||||
|
||||
Assert.IsTrue(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace FileFlows.VideoNodes
|
||||
}
|
||||
else if (vidparams.ToLower().Contains("h264_nvenc"))
|
||||
{
|
||||
// nvidia h265 encoding, check can
|
||||
// nvidia h264 encoding, check can
|
||||
bool canProcess = CanProcessEncoder(ffmpeg, vidparams);
|
||||
if (canProcess == false)
|
||||
{
|
||||
@@ -199,6 +199,30 @@ namespace FileFlows.VideoNodes
|
||||
}
|
||||
return vidparams;
|
||||
}
|
||||
else if (vidparams.ToLower().Contains("hevc_qsv"))
|
||||
{
|
||||
// nvidia h265 encoding, check can
|
||||
bool canProcess = CanProcessEncoder(ffmpeg, vidparams);
|
||||
if (canProcess == false)
|
||||
{
|
||||
// change to cpu encoding
|
||||
args.Logger?.ILog("Can't encode using hevc_qsv, falling back to CPU encoding H265 (libx265)");
|
||||
return "libx265";
|
||||
}
|
||||
return vidparams;
|
||||
}
|
||||
else if (vidparams.ToLower().Contains("h264_qsv"))
|
||||
{
|
||||
// nvidia h264 encoding, check can
|
||||
bool canProcess = CanProcessEncoder(ffmpeg, vidparams);
|
||||
if (canProcess == false)
|
||||
{
|
||||
// change to cpu encoding
|
||||
args.Logger?.ILog("Can't encode using h264_qsv, falling back to CPU encoding H264 (libx264)");
|
||||
return "libx264";
|
||||
}
|
||||
return vidparams;
|
||||
}
|
||||
return vidparams;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user