2020-04-05 18:10:56 +02:00
|
|
|
#nullable disable
|
2023-01-02 22:26:54 +01:00
|
|
|
using MediaBrowser.Model.Entities;
|
2020-02-04 01:49:27 +01:00
|
|
|
|
2023-01-02 22:26:54 +01:00
|
|
|
namespace MediaBrowser.Model.Configuration;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Class EncodingOptions.
|
|
|
|
/// </summary>
|
|
|
|
public class EncodingOptions
|
2018-12-28 00:27:57 +01:00
|
|
|
{
|
2023-01-02 22:26:54 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="EncodingOptions" /> class.
|
|
|
|
/// </summary>
|
|
|
|
public EncodingOptions()
|
2018-12-28 00:27:57 +01:00
|
|
|
{
|
2023-01-02 22:26:54 +01:00
|
|
|
EnableFallbackFont = false;
|
2022-11-07 00:15:04 +01:00
|
|
|
EnableAudioVbr = false;
|
2023-01-02 22:26:54 +01:00
|
|
|
DownMixAudioBoost = 2;
|
|
|
|
DownMixStereoAlgorithm = DownMixStereoAlgorithms.None;
|
|
|
|
MaxMuxingQueueSize = 2048;
|
|
|
|
EnableThrottling = false;
|
|
|
|
ThrottleDelaySeconds = 180;
|
2023-06-15 19:38:42 +02:00
|
|
|
EnableSegmentDeletion = false;
|
2023-06-15 21:38:45 +02:00
|
|
|
SegmentKeepSeconds = 720;
|
2023-01-02 22:26:54 +01:00
|
|
|
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;
|
2024-02-29 02:03:00 +01:00
|
|
|
EnableVideoToolboxTonemapping = false;
|
2023-01-02 22:26:54 +01:00
|
|
|
TonemappingAlgorithm = "bt2390";
|
2023-06-13 16:53:35 +02:00
|
|
|
TonemappingMode = "auto";
|
2023-01-02 22:26:54 +01:00
|
|
|
TonemappingRange = "auto";
|
|
|
|
TonemappingDesat = 0;
|
|
|
|
TonemappingPeak = 100;
|
|
|
|
TonemappingParam = 0;
|
2023-06-13 16:53:35 +02:00
|
|
|
VppTonemappingBrightness = 16;
|
|
|
|
VppTonemappingContrast = 1;
|
2023-01-02 22:26:54 +01:00
|
|
|
H264Crf = 23;
|
|
|
|
H265Crf = 28;
|
|
|
|
DeinterlaceDoubleRate = false;
|
|
|
|
DeinterlaceMethod = "yadif";
|
|
|
|
EnableDecodingColorDepth10Hevc = true;
|
|
|
|
EnableDecodingColorDepth10Vp9 = true;
|
2023-03-10 01:35:54 +01:00
|
|
|
// Enhanced Nvdec or system native decoder is required for DoVi to SDR tone-mapping.
|
|
|
|
EnableEnhancedNvdecDecoder = true;
|
2023-01-02 22:26:54 +01:00
|
|
|
PreferSystemNativeHwDecoder = true;
|
|
|
|
EnableIntelLowPowerH264HwEncoder = false;
|
|
|
|
EnableIntelLowPowerHevcHwEncoder = false;
|
|
|
|
EnableHardwareEncoding = true;
|
|
|
|
AllowHevcEncoding = false;
|
2023-06-19 21:49:26 +02:00
|
|
|
AllowAv1Encoding = false;
|
2023-01-02 22:26:54 +01:00
|
|
|
EnableSubtitleExtraction = true;
|
|
|
|
AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
|
|
|
|
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
|
2018-12-28 00:27:57 +01:00
|
|
|
}
|
2023-01-02 22:26:54 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the thread count used for encoding.
|
|
|
|
/// </summary>
|
|
|
|
public int EncodingThreadCount { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the temporary transcoding path.
|
|
|
|
/// </summary>
|
|
|
|
public string TranscodingTempPath { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the path to the fallback font.
|
|
|
|
/// </summary>
|
|
|
|
public string FallbackFontPath { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether to use the fallback font.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableFallbackFont { get; set; }
|
|
|
|
|
2022-11-07 00:15:04 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether audio VBR is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableAudioVbr { get; set; }
|
|
|
|
|
2023-01-02 22:26:54 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the audio boost applied when downmixing audio.
|
|
|
|
/// </summary>
|
|
|
|
public double DownMixAudioBoost { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the algorithm used for downmixing audio to stereo.
|
|
|
|
/// </summary>
|
|
|
|
public DownMixStereoAlgorithms DownMixStereoAlgorithm { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the maximum size of the muxing queue.
|
|
|
|
/// </summary>
|
|
|
|
public int MaxMuxingQueueSize { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether throttling is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableThrottling { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the delay after which throttling happens.
|
|
|
|
/// </summary>
|
|
|
|
public int ThrottleDelaySeconds { get; set; }
|
2023-06-15 19:55:11 +02:00
|
|
|
|
2023-06-15 19:38:42 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether segment deletion is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableSegmentDeletion { get; set; }
|
2023-06-15 19:55:11 +02:00
|
|
|
|
2023-06-15 19:38:42 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets seconds for which segments should be kept before being deleted.
|
|
|
|
/// </summary>
|
|
|
|
public int SegmentKeepSeconds { get; set; }
|
2023-01-02 22:26:54 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the hardware acceleration type.
|
|
|
|
/// </summary>
|
|
|
|
public string HardwareAccelerationType { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the FFmpeg path as set by the user via the UI.
|
|
|
|
/// </summary>
|
|
|
|
public string EncoderAppPath { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
|
|
|
|
/// </summary>
|
|
|
|
public string EncoderAppPathDisplay { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the VA-API device.
|
|
|
|
/// </summary>
|
|
|
|
public string VaapiDevice { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether tonemapping is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableTonemapping { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether VPP tonemapping is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableVppTonemapping { get; set; }
|
|
|
|
|
2024-02-15 17:16:59 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether videotoolbox tonemapping is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableVideoToolboxTonemapping { get; set; }
|
|
|
|
|
2023-01-02 22:26:54 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the tone-mapping algorithm.
|
|
|
|
/// </summary>
|
|
|
|
public string TonemappingAlgorithm { get; set; }
|
|
|
|
|
2023-06-13 16:53:35 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the tone-mapping mode.
|
|
|
|
/// </summary>
|
|
|
|
public string TonemappingMode { get; set; }
|
|
|
|
|
2023-01-02 22:26:54 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the tone-mapping range.
|
|
|
|
/// </summary>
|
|
|
|
public string TonemappingRange { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the tone-mapping desaturation.
|
|
|
|
/// </summary>
|
|
|
|
public double TonemappingDesat { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the tone-mapping peak.
|
|
|
|
/// </summary>
|
|
|
|
public double TonemappingPeak { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the tone-mapping parameters.
|
|
|
|
/// </summary>
|
|
|
|
public double TonemappingParam { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the VPP tone-mapping brightness.
|
|
|
|
/// </summary>
|
|
|
|
public double VppTonemappingBrightness { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the VPP tone-mapping contrast.
|
|
|
|
/// </summary>
|
|
|
|
public double VppTonemappingContrast { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the H264 CRF.
|
|
|
|
/// </summary>
|
|
|
|
public int H264Crf { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the H265 CRF.
|
|
|
|
/// </summary>
|
|
|
|
public int H265Crf { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the encoder preset.
|
|
|
|
/// </summary>
|
|
|
|
public string EncoderPreset { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether the framerate is doubled when deinterlacing.
|
|
|
|
/// </summary>
|
|
|
|
public bool DeinterlaceDoubleRate { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the deinterlace method.
|
|
|
|
/// </summary>
|
|
|
|
public string DeinterlaceMethod { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether 10bit HEVC decoding is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableDecodingColorDepth10Hevc { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether 10bit VP9 decoding is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableDecodingColorDepth10Vp9 { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether the enhanced NVDEC is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableEnhancedNvdecDecoder { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether the system native hardware decoder should be used.
|
|
|
|
/// </summary>
|
|
|
|
public bool PreferSystemNativeHwDecoder { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether the Intel H264 low-power hardware encoder should be used.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableIntelLowPowerH264HwEncoder { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether the Intel HEVC low-power hardware encoder should be used.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether hardware encoding is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableHardwareEncoding { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether HEVC encoding is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool AllowHevcEncoding { get; set; }
|
|
|
|
|
2023-06-19 21:49:26 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether AV1 encoding is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool AllowAv1Encoding { get; set; }
|
|
|
|
|
2023-01-02 22:26:54 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether subtitle extraction is enabled.
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableSubtitleExtraction { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the codecs hardware encoding is used for.
|
|
|
|
/// </summary>
|
|
|
|
public string[] HardwareDecodingCodecs { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the file extensions on-demand metadata based keyframe extraction is enabled for.
|
|
|
|
/// </summary>
|
|
|
|
public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
|
2018-12-28 00:27:57 +01:00
|
|
|
}
|