FF-1224 - fixed vaapi issues

This commit is contained in:
John Andrews
2024-01-31 14:17:16 +13:00
parent 34aa42d821
commit a953469c00
4 changed files with 4 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -12,7 +12,7 @@ public class VaapiAdjustments : IEncoderAdjustment
/// </summary>
/// <param name="args">the ffmepg args</param>
/// <returns>true if using VAAPI hardware encoding, otherwise false</returns>
public static bool IsUsingVaapi(List<string> args)
public static bool IsUsingVaapi(IEnumerable<string> args)
=> args.Any(x => x == "hevc_vaapi" || x == "h264_vaapi");
/// <summary>

View File

@@ -1,6 +1,7 @@
using FileFlows.Plugin;
using FileFlows.VideoNodes.FfmpegBuilderNodes.Models;
using System.Runtime.InteropServices;
using FileFlows.VideoNodes.FfmpegBuilderNodes.EncoderAdjustments;
using FileFlows.VideoNodes.Helpers;
namespace FileFlows.VideoNodes.FfmpegBuilderNodes;
@@ -333,7 +334,8 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
var hw = hwOrig.Select(x => x.Replace("#FORMAT#", pixelFormat)).ToArray();
hw = EncoderAdjustments.EncoderAdjustment.Run(args.Logger, hw.ToList()).ToArray();
if(VaapiAdjustments.IsUsingVaapi(hw))
hw = new VaapiAdjustments().Run(args.Logger, hw.ToList()).ToArray();
args.AdditionalInfoRecorder("Testing", string.Join(" ", hw), new TimeSpan(0, 0, 10));