#nullable disable
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Configuration;
///
/// Class EncodingOptions.
///
public class EncodingOptions
{
///
/// Initializes a new instance of the class.
///
public EncodingOptions()
{
EnableFallbackFont = false;
EnableAudioVbr = false;
DownMixAudioBoost = 2;
DownMixStereoAlgorithm = DownMixStereoAlgorithms.None;
MaxMuxingQueueSize = 2048;
EnableThrottling = false;
ThrottleDelaySeconds = 180;
EnableSegmentDeletion = false;
SegmentKeepSeconds = 360;
EncodingThreadCount = -1;
// This is a DRM device that is almost guaranteed to be there on every intel platform,
// plus it's the default one in ffmpeg if you don't specify anything
VaapiDevice = "/dev/dri/renderD128";
EnableTonemapping = false;
EnableVppTonemapping = false;
TonemappingAlgorithm = "bt2390";
TonemappingMode = "auto";
TonemappingRange = "auto";
TonemappingDesat = 0;
TonemappingPeak = 100;
TonemappingParam = 0;
VppTonemappingBrightness = 16;
VppTonemappingContrast = 1;
H264Crf = 23;
H265Crf = 28;
DeinterlaceDoubleRate = false;
DeinterlaceMethod = "yadif";
EnableDecodingColorDepth10Hevc = true;
EnableDecodingColorDepth10Vp9 = true;
// Enhanced Nvdec or system native decoder is required for DoVi to SDR tone-mapping.
EnableEnhancedNvdecDecoder = true;
PreferSystemNativeHwDecoder = true;
EnableIntelLowPowerH264HwEncoder = false;
EnableIntelLowPowerHevcHwEncoder = false;
EnableHardwareEncoding = true;
AllowHevcEncoding = false;
EnableSubtitleExtraction = true;
AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
}
///
/// Gets or sets the thread count used for encoding.
///
public int EncodingThreadCount { get; set; }
///
/// Gets or sets the temporary transcoding path.
///
public string TranscodingTempPath { get; set; }
///
/// Gets or sets the path to the fallback font.
///
public string FallbackFontPath { get; set; }
///
/// Gets or sets a value indicating whether to use the fallback font.
///
public bool EnableFallbackFont { get; set; }
///
/// Gets or sets a value indicating whether audio VBR is enabled.
///
public bool EnableAudioVbr { get; set; }
///
/// Gets or sets the audio boost applied when downmixing audio.
///
public double DownMixAudioBoost { get; set; }
///
/// Gets or sets the algorithm used for downmixing audio to stereo.
///
public DownMixStereoAlgorithms DownMixStereoAlgorithm { get; set; }
///
/// Gets or sets the maximum size of the muxing queue.
///
public int MaxMuxingQueueSize { get; set; }
///
/// Gets or sets a value indicating whether throttling is enabled.
///
public bool EnableThrottling { get; set; }
///
/// Gets or sets the delay after which throttling happens.
///
public int ThrottleDelaySeconds { get; set; }
///
/// Gets or sets a value indicating whether segment deletion is enabled.
///
public bool EnableSegmentDeletion { get; set; }
///
/// Gets or sets seconds for which segments should be kept before being deleted.
///
public int SegmentKeepSeconds { get; set; }
///
/// Gets or sets the hardware acceleration type.
///
public string HardwareAccelerationType { get; set; }
///
/// Gets or sets the FFmpeg path as set by the user via the UI.
///
public string EncoderAppPath { get; set; }
///
/// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
///
public string EncoderAppPathDisplay { get; set; }
///
/// Gets or sets the VA-API device.
///
public string VaapiDevice { get; set; }
///
/// Gets or sets a value indicating whether tonemapping is enabled.
///
public bool EnableTonemapping { get; set; }
///
/// Gets or sets a value indicating whether VPP tonemapping is enabled.
///
public bool EnableVppTonemapping { get; set; }
///
/// Gets or sets the tone-mapping algorithm.
///
public string TonemappingAlgorithm { get; set; }
///
/// Gets or sets the tone-mapping mode.
///
public string TonemappingMode { get; set; }
///
/// Gets or sets the tone-mapping range.
///
public string TonemappingRange { get; set; }
///
/// Gets or sets the tone-mapping desaturation.
///
public double TonemappingDesat { get; set; }
///
/// Gets or sets the tone-mapping peak.
///
public double TonemappingPeak { get; set; }
///
/// Gets or sets the tone-mapping parameters.
///
public double TonemappingParam { get; set; }
///
/// Gets or sets the VPP tone-mapping brightness.
///
public double VppTonemappingBrightness { get; set; }
///
/// Gets or sets the VPP tone-mapping contrast.
///
public double VppTonemappingContrast { get; set; }
///
/// Gets or sets the H264 CRF.
///
public int H264Crf { get; set; }
///
/// Gets or sets the H265 CRF.
///
public int H265Crf { get; set; }
///
/// Gets or sets the encoder preset.
///
public string EncoderPreset { get; set; }
///
/// Gets or sets a value indicating whether the framerate is doubled when deinterlacing.
///
public bool DeinterlaceDoubleRate { get; set; }
///
/// Gets or sets the deinterlace method.
///
public string DeinterlaceMethod { get; set; }
///
/// Gets or sets a value indicating whether 10bit HEVC decoding is enabled.
///
public bool EnableDecodingColorDepth10Hevc { get; set; }
///
/// Gets or sets a value indicating whether 10bit VP9 decoding is enabled.
///
public bool EnableDecodingColorDepth10Vp9 { get; set; }
///
/// Gets or sets a value indicating whether the enhanced NVDEC is enabled.
///
public bool EnableEnhancedNvdecDecoder { get; set; }
///
/// Gets or sets a value indicating whether the system native hardware decoder should be used.
///
public bool PreferSystemNativeHwDecoder { get; set; }
///
/// Gets or sets a value indicating whether the Intel H264 low-power hardware encoder should be used.
///
public bool EnableIntelLowPowerH264HwEncoder { get; set; }
///
/// Gets or sets a value indicating whether the Intel HEVC low-power hardware encoder should be used.
///
public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
///
/// Gets or sets a value indicating whether hardware encoding is enabled.
///
public bool EnableHardwareEncoding { get; set; }
///
/// Gets or sets a value indicating whether HEVC encoding is enabled.
///
public bool AllowHevcEncoding { get; set; }
///
/// Gets or sets a value indicating whether subtitle extraction is enabled.
///
public bool EnableSubtitleExtraction { get; set; }
///
/// Gets or sets the codecs hardware encoding is used for.
///
public string[] HardwareDecodingCodecs { get; set; }
///
/// Gets or sets the file extensions on-demand metadata based keyframe extraction is enabled for.
///
public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
}