only use packed headers with vaapi when supported by encoder (#2706)

This commit is contained in:
Jason Dove
2025-12-05 11:20:16 -06:00
committed by GitHub
parent c14f373f23
commit d30e8b4102
8 changed files with 80 additions and 78 deletions
@@ -2,7 +2,8 @@
namespace ErsatzTV.FFmpeg.Encoder.Vaapi;
public class EncoderH264Vaapi(Option<string> maybeVideoProfile, RateControlMode rateControlMode) : EncoderBase
public class EncoderH264Vaapi(Option<string> maybeVideoProfile, RateControlMode rateControlMode, bool packedHeaderMisc)
: EncoderBase
{
public override string Name => "h264_vaapi";
@@ -20,8 +21,11 @@ public class EncoderH264Vaapi(Option<string> maybeVideoProfile, RateControlMode
result.Add("1");
}
result.Add("-sei");
result.Add("-a53_cc");
if (packedHeaderMisc)
{
result.Add("-sei");
result.Add("-a53_cc");
}
foreach (string videoProfile in maybeVideoProfile)
{