Files
ersatztv/ErsatzTV.FFmpeg/Encoder/EncoderLibx265.cs
T
Jason DoveandGitHub dd7f77751c detect nvidia capabilities (#853)
* fallback to software codecs for old nvidia cards

* update dependencies
2022-06-14 19:44:34 -05:00

24 lines
791 B
C#

using ErsatzTV.FFmpeg.Filter;
using ErsatzTV.FFmpeg.Format;
namespace ErsatzTV.FFmpeg.Encoder;
public class EncoderLibx265 : EncoderBase
{
private readonly FrameState _currentState;
public EncoderLibx265(FrameState currentState) => _currentState = currentState;
public override string Filter => new HardwareDownloadFilter(_currentState).Filter;
// TODO: is tag:v needed for mpegts?
public override IList<string> OutputOptions => new List<string>
{ "-c:v", Name, "-tag:v", "hvc1", "-x265-params", "log-level=error" };
public override string Name => "libx265";
public override StreamKind Kind => StreamKind.Video;
public override FrameState NextState(FrameState currentState) =>
currentState with { VideoFormat = VideoFormat.Hevc };
}