Stream custom live channels using your own media
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
516 B

using ErsatzTV.FFmpeg.Format;
namespace ErsatzTV.FFmpeg.OutputOption;
public class PixelFormatOutputOption : OutputOption
{
private readonly IPixelFormat _pixelFormat;
public PixelFormatOutputOption(IPixelFormat pixelFormat) => _pixelFormat = pixelFormat;
public override string[] OutputOptions => new[]
{
"-pix_fmt", _pixelFormat.FFmpegName
};
public override FrameState NextState(FrameState currentState) =>
currentState with { PixelFormat = Some(_pixelFormat) };
}