< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Configuration.EncodingOptions
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Configuration/EncodingOptions.cs
Line coverage
100%
Covered lines: 40
Uncovered lines: 0
Coverable lines: 40
Total lines: 286
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Configuration/EncodingOptions.cs

#LineLine coverage
 1#pragma warning disable CA1819 // XML serialization handles collections improperly, so we need to use arrays
 2
 3#nullable disable
 4using MediaBrowser.Model.Entities;
 5
 6namespace MediaBrowser.Model.Configuration;
 7
 8/// <summary>
 9/// Class EncodingOptions.
 10/// </summary>
 11public class EncodingOptions
 12{
 13    /// <summary>
 14    /// Initializes a new instance of the <see cref="EncodingOptions" /> class.
 15    /// </summary>
 16    public EncodingOptions()
 17    {
 318        EnableFallbackFont = false;
 319        EnableAudioVbr = false;
 320        DownMixAudioBoost = 2;
 321        DownMixStereoAlgorithm = DownMixStereoAlgorithms.None;
 322        MaxMuxingQueueSize = 2048;
 323        EnableThrottling = false;
 324        ThrottleDelaySeconds = 180;
 325        EnableSegmentDeletion = false;
 326        SegmentKeepSeconds = 720;
 327        EncodingThreadCount = -1;
 28        // This is a DRM device that is almost guaranteed to be there on every intel platform,
 29        // plus it's the default one in ffmpeg if you don't specify anything
 330        VaapiDevice = "/dev/dri/renderD128";
 331        QsvDevice = string.Empty;
 332        EnableTonemapping = false;
 333        EnableVppTonemapping = false;
 334        EnableVideoToolboxTonemapping = false;
 335        TonemappingAlgorithm = TonemappingAlgorithm.bt2390;
 336        TonemappingMode = TonemappingMode.auto;
 337        TonemappingRange = TonemappingRange.auto;
 338        TonemappingDesat = 0;
 339        TonemappingPeak = 100;
 340        TonemappingParam = 0;
 341        VppTonemappingBrightness = 16;
 342        VppTonemappingContrast = 1;
 343        H264Crf = 23;
 344        H265Crf = 28;
 345        DeinterlaceDoubleRate = false;
 346        DeinterlaceMethod = DeinterlaceMethod.yadif;
 347        EnableDecodingColorDepth10Hevc = true;
 348        EnableDecodingColorDepth10Vp9 = true;
 49        // Enhanced Nvdec or system native decoder is required for DoVi to SDR tone-mapping.
 350        EnableEnhancedNvdecDecoder = true;
 351        PreferSystemNativeHwDecoder = true;
 352        EnableIntelLowPowerH264HwEncoder = false;
 353        EnableIntelLowPowerHevcHwEncoder = false;
 354        EnableHardwareEncoding = true;
 355        AllowHevcEncoding = false;
 356        AllowAv1Encoding = false;
 357        EnableSubtitleExtraction = true;
 358        AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = ["mkv"];
 359        HardwareDecodingCodecs = ["h264", "vc1"];
 360    }
 61
 62    /// <summary>
 63    /// Gets or sets the thread count used for encoding.
 64    /// </summary>
 65    public int EncodingThreadCount { get; set; }
 66
 67    /// <summary>
 68    /// Gets or sets the temporary transcoding path.
 69    /// </summary>
 70    public string TranscodingTempPath { get; set; }
 71
 72    /// <summary>
 73    /// Gets or sets the path to the fallback font.
 74    /// </summary>
 75    public string FallbackFontPath { get; set; }
 76
 77    /// <summary>
 78    /// Gets or sets a value indicating whether to use the fallback font.
 79    /// </summary>
 80    public bool EnableFallbackFont { get; set; }
 81
 82    /// <summary>
 83    /// Gets or sets a value indicating whether audio VBR is enabled.
 84    /// </summary>
 85    public bool EnableAudioVbr { get; set; }
 86
 87    /// <summary>
 88    /// Gets or sets the audio boost applied when downmixing audio.
 89    /// </summary>
 90    public double DownMixAudioBoost { get; set; }
 91
 92    /// <summary>
 93    /// Gets or sets the algorithm used for downmixing audio to stereo.
 94    /// </summary>
 95    public DownMixStereoAlgorithms DownMixStereoAlgorithm { get; set; }
 96
 97    /// <summary>
 98    /// Gets or sets the maximum size of the muxing queue.
 99    /// </summary>
 100    public int MaxMuxingQueueSize { get; set; }
 101
 102    /// <summary>
 103    /// Gets or sets a value indicating whether throttling is enabled.
 104    /// </summary>
 105    public bool EnableThrottling { get; set; }
 106
 107    /// <summary>
 108    /// Gets or sets the delay after which throttling happens.
 109    /// </summary>
 110    public int ThrottleDelaySeconds { get; set; }
 111
 112    /// <summary>
 113    /// Gets or sets a value indicating whether segment deletion is enabled.
 114    /// </summary>
 115    public bool EnableSegmentDeletion { get; set; }
 116
 117    /// <summary>
 118    /// Gets or sets seconds for which segments should be kept before being deleted.
 119    /// </summary>
 120    public int SegmentKeepSeconds { get; set; }
 121
 122    /// <summary>
 123    /// Gets or sets the hardware acceleration type.
 124    /// </summary>
 125    public HardwareAccelerationType HardwareAccelerationType { get; set; }
 126
 127    /// <summary>
 128    /// Gets or sets the FFmpeg path as set by the user via the UI.
 129    /// </summary>
 130    public string EncoderAppPath { get; set; }
 131
 132    /// <summary>
 133    /// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
 134    /// </summary>
 135    public string EncoderAppPathDisplay { get; set; }
 136
 137    /// <summary>
 138    /// Gets or sets the VA-API device.
 139    /// </summary>
 140    public string VaapiDevice { get; set; }
 141
 142    /// <summary>
 143    /// Gets or sets the QSV device.
 144    /// </summary>
 145    public string QsvDevice { get; set; }
 146
 147    /// <summary>
 148    /// Gets or sets a value indicating whether tonemapping is enabled.
 149    /// </summary>
 150    public bool EnableTonemapping { get; set; }
 151
 152    /// <summary>
 153    /// Gets or sets a value indicating whether VPP tonemapping is enabled.
 154    /// </summary>
 155    public bool EnableVppTonemapping { get; set; }
 156
 157    /// <summary>
 158    /// Gets or sets a value indicating whether videotoolbox tonemapping is enabled.
 159    /// </summary>
 160    public bool EnableVideoToolboxTonemapping { get; set; }
 161
 162    /// <summary>
 163    /// Gets or sets the tone-mapping algorithm.
 164    /// </summary>
 165    public TonemappingAlgorithm TonemappingAlgorithm { get; set; }
 166
 167    /// <summary>
 168    /// Gets or sets the tone-mapping mode.
 169    /// </summary>
 170    public TonemappingMode TonemappingMode { get; set; }
 171
 172    /// <summary>
 173    /// Gets or sets the tone-mapping range.
 174    /// </summary>
 175    public TonemappingRange TonemappingRange { get; set; }
 176
 177    /// <summary>
 178    /// Gets or sets the tone-mapping desaturation.
 179    /// </summary>
 180    public double TonemappingDesat { get; set; }
 181
 182    /// <summary>
 183    /// Gets or sets the tone-mapping peak.
 184    /// </summary>
 185    public double TonemappingPeak { get; set; }
 186
 187    /// <summary>
 188    /// Gets or sets the tone-mapping parameters.
 189    /// </summary>
 190    public double TonemappingParam { get; set; }
 191
 192    /// <summary>
 193    /// Gets or sets the VPP tone-mapping brightness.
 194    /// </summary>
 195    public double VppTonemappingBrightness { get; set; }
 196
 197    /// <summary>
 198    /// Gets or sets the VPP tone-mapping contrast.
 199    /// </summary>
 200    public double VppTonemappingContrast { get; set; }
 201
 202    /// <summary>
 203    /// Gets or sets the H264 CRF.
 204    /// </summary>
 205    public int H264Crf { get; set; }
 206
 207    /// <summary>
 208    /// Gets or sets the H265 CRF.
 209    /// </summary>
 210    public int H265Crf { get; set; }
 211
 212    /// <summary>
 213    /// Gets or sets the encoder preset.
 214    /// </summary>
 215    public EncoderPreset? EncoderPreset { get; set; }
 216
 217    /// <summary>
 218    /// Gets or sets a value indicating whether the framerate is doubled when deinterlacing.
 219    /// </summary>
 220    public bool DeinterlaceDoubleRate { get; set; }
 221
 222    /// <summary>
 223    /// Gets or sets the deinterlace method.
 224    /// </summary>
 225    public DeinterlaceMethod DeinterlaceMethod { get; set; }
 226
 227    /// <summary>
 228    /// Gets or sets a value indicating whether 10bit HEVC decoding is enabled.
 229    /// </summary>
 230    public bool EnableDecodingColorDepth10Hevc { get; set; }
 231
 232    /// <summary>
 233    /// Gets or sets a value indicating whether 10bit VP9 decoding is enabled.
 234    /// </summary>
 235    public bool EnableDecodingColorDepth10Vp9 { get; set; }
 236
 237    /// <summary>
 238    /// Gets or sets a value indicating whether the enhanced NVDEC is enabled.
 239    /// </summary>
 240    public bool EnableEnhancedNvdecDecoder { get; set; }
 241
 242    /// <summary>
 243    /// Gets or sets a value indicating whether the system native hardware decoder should be used.
 244    /// </summary>
 245    public bool PreferSystemNativeHwDecoder { get; set; }
 246
 247    /// <summary>
 248    /// Gets or sets a value indicating whether the Intel H264 low-power hardware encoder should be used.
 249    /// </summary>
 250    public bool EnableIntelLowPowerH264HwEncoder { get; set; }
 251
 252    /// <summary>
 253    /// Gets or sets a value indicating whether the Intel HEVC low-power hardware encoder should be used.
 254    /// </summary>
 255    public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
 256
 257    /// <summary>
 258    /// Gets or sets a value indicating whether hardware encoding is enabled.
 259    /// </summary>
 260    public bool EnableHardwareEncoding { get; set; }
 261
 262    /// <summary>
 263    /// Gets or sets a value indicating whether HEVC encoding is enabled.
 264    /// </summary>
 265    public bool AllowHevcEncoding { get; set; }
 266
 267    /// <summary>
 268    /// Gets or sets a value indicating whether AV1 encoding is enabled.
 269    /// </summary>
 270    public bool AllowAv1Encoding { get; set; }
 271
 272    /// <summary>
 273    /// Gets or sets a value indicating whether subtitle extraction is enabled.
 274    /// </summary>
 275    public bool EnableSubtitleExtraction { get; set; }
 276
 277    /// <summary>
 278    /// Gets or sets the codecs hardware encoding is used for.
 279    /// </summary>
 280    public string[] HardwareDecodingCodecs { get; set; }
 281
 282    /// <summary>
 283    /// Gets or sets the file extensions on-demand metadata based keyframe extraction is enabled for.
 284    /// </summary>
 285    public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
 286}

Methods/Properties

.ctor()