Files
ersatztv/ErsatzTV.FFmpeg/OutputOption/PixelFormatOutputOption.cs
T
Jason DoveandGitHub aa5ba5a78e fix recent nvidia regression (#2437)
* fix recent nvidia regression

* update transcoding tests for graphics engine
2025-09-18 03:15:23 +00:00

19 lines
543 B
C#

using ErsatzTV.FFmpeg.Format;
namespace ErsatzTV.FFmpeg.OutputOption;
public class PixelFormatOutputOption(
IPixelFormat pixelFormat,
HardwareAccelerationMode encoderMode = HardwareAccelerationMode.None)
: OutputOption
{
public override string[] OutputOptions =>
[
"-pix_fmt", encoderMode is HardwareAccelerationMode.Nvenc ? pixelFormat.FFmpegName : pixelFormat.Name
];
public override FrameState NextState(FrameState currentState) =>
currentState with { PixelFormat = Some(pixelFormat) };
}