mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-01-09 16:01:28 -06:00
fixed issue with vaapi and amf encoders
This commit is contained in:
@@ -195,7 +195,7 @@ public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
|
||||
stream.EncodingParameters.Clear();
|
||||
stream.EncodingParameters.AddRange(new[]
|
||||
{
|
||||
h265 ? "amf_nvenc" : "amf_nvenc",
|
||||
h265 ? "hevc_amf" : "h264_amf",
|
||||
"-rc", "constqp",
|
||||
"-qp", Quality.ToString(),
|
||||
//"-b:v", "0K", // this would do a two-pass... slower
|
||||
@@ -212,7 +212,7 @@ public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
|
||||
stream.EncodingParameters.Clear();
|
||||
stream.EncodingParameters.AddRange(new[]
|
||||
{
|
||||
h265 ? "amf_nvenc" : "amf_nvenc",
|
||||
h265 ? "hevc_vaapi" : "h264_vaapi",
|
||||
"-rc", "constqp",
|
||||
"-qp", Quality.ToString(),
|
||||
//"-b:v", "0K", // this would do a two-pass... slower
|
||||
|
||||
@@ -160,6 +160,31 @@ public class VideoHasStreamTests : TestBase
|
||||
|
||||
Assert.AreEqual(2, output);
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void VideoHasStream_Video_Tag()
|
||||
{
|
||||
string file = TestFile_Tag;
|
||||
var vi = new VideoInfoHelper(FfmpegPath, new TestLogger());
|
||||
var vii = vi.Read(file);
|
||||
|
||||
VideoHasStream node = new();
|
||||
node.Codec = "h264";
|
||||
node.Stream = "Video";
|
||||
|
||||
var args = new NodeParameters(file, new TestLogger(), false, string.Empty);
|
||||
args.GetToolPathActual = (string tool) => FfmpegPath;
|
||||
args.TempPath = TempPath;
|
||||
|
||||
var vf = new VideoFile();
|
||||
vf.PreExecute(args);
|
||||
Assert.AreEqual(1, vf.Execute(args));
|
||||
|
||||
int output = node.Execute(args);
|
||||
|
||||
Assert.AreEqual(1, output);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ public abstract class TestBase
|
||||
}
|
||||
|
||||
protected string TestFile_BasicMkv => Path.Combine(TestPath, "basic.mkv");
|
||||
protected string TestFile_Tag => Path.Combine(TestPath, "tag.mp4");
|
||||
protected string TestFile_Pgs => Path.Combine(TestPath, "pgs.mkv");
|
||||
protected string TestFile_TwoPassNegInifinity => Path.Combine(TestPath, "audio_normal_neg_infinity.mkv");
|
||||
protected string TestFile_4k_h264mov => Path.Combine(TestPath, "4k_h264.mov");
|
||||
|
||||
Reference in New Issue
Block a user