< 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: 43
Uncovered lines: 0
Coverable lines: 43
Total lines: 304
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 9/14/2025 - 12:09:49 AM Line coverage: 100% (42/42) Total lines: 29812/3/2025 - 12:11:26 AM Line coverage: 100% (43/43) Total lines: 304

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    {
 418        EnableFallbackFont = false;
 419        EnableAudioVbr = false;
 420        DownMixAudioBoost = 2;
 421        DownMixStereoAlgorithm = DownMixStereoAlgorithms.None;
 422        MaxMuxingQueueSize = 2048;
 423        EnableThrottling = false;
 424        ThrottleDelaySeconds = 180;
 425        EnableSegmentDeletion = false;
 426        SegmentKeepSeconds = 720;
 427        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
 430        VaapiDevice = "/dev/dri/renderD128";
 431        QsvDevice = string.Empty;
 432        EnableTonemapping = false;
 433        EnableVppTonemapping = false;
 434        EnableVideoToolboxTonemapping = false;
 435        TonemappingAlgorithm = TonemappingAlgorithm.bt2390;
 436        TonemappingMode = TonemappingMode.auto;
 437        TonemappingRange = TonemappingRange.auto;
 438        TonemappingDesat = 0;
 439        TonemappingPeak = 100;
 440        TonemappingParam = 0;
 441        VppTonemappingBrightness = 16;
 442        VppTonemappingContrast = 1;
 443        H264Crf = 23;
 444        H265Crf = 28;
 445        DeinterlaceDoubleRate = false;
 446        DeinterlaceMethod = DeinterlaceMethod.yadif;
 447        EnableDecodingColorDepth10Hevc = true;
 448        EnableDecodingColorDepth10Vp9 = true;
 449        EnableDecodingColorDepth10HevcRext = false;
 450        EnableDecodingColorDepth12HevcRext = false;
 51        // Enhanced Nvdec or system native decoder is required for DoVi to SDR tone-mapping.
 452        EnableEnhancedNvdecDecoder = true;
 453        PreferSystemNativeHwDecoder = true;
 454        EnableIntelLowPowerH264HwEncoder = false;
 455        EnableIntelLowPowerHevcHwEncoder = false;
 456        EnableHardwareEncoding = true;
 457        AllowHevcEncoding = false;
 458        AllowAv1Encoding = false;
 459        EnableSubtitleExtraction = true;
 460        SubtitleExtractionTimeoutMinutes = 30;
 461        AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = ["mkv"];
 462        HardwareDecodingCodecs = ["h264", "vc1"];
 463    }
 64
 65    /// <summary>
 66    /// Gets or sets the thread count used for encoding.
 67    /// </summary>
 68    public int EncodingThreadCount { get; set; }
 69
 70    /// <summary>
 71    /// Gets or sets the temporary transcoding path.
 72    /// </summary>
 73    public string TranscodingTempPath { get; set; }
 74
 75    /// <summary>
 76    /// Gets or sets the path to the fallback font.
 77    /// </summary>
 78    public string FallbackFontPath { get; set; }
 79
 80    /// <summary>
 81    /// Gets or sets a value indicating whether to use the fallback font.
 82    /// </summary>
 83    public bool EnableFallbackFont { get; set; }
 84
 85    /// <summary>
 86    /// Gets or sets a value indicating whether audio VBR is enabled.
 87    /// </summary>
 88    public bool EnableAudioVbr { get; set; }
 89
 90    /// <summary>
 91    /// Gets or sets the audio boost applied when downmixing audio.
 92    /// </summary>
 93    public double DownMixAudioBoost { get; set; }
 94
 95    /// <summary>
 96    /// Gets or sets the algorithm used for downmixing audio to stereo.
 97    /// </summary>
 98    public DownMixStereoAlgorithms DownMixStereoAlgorithm { get; set; }
 99
 100    /// <summary>
 101    /// Gets or sets the maximum size of the muxing queue.
 102    /// </summary>
 103    public int MaxMuxingQueueSize { get; set; }
 104
 105    /// <summary>
 106    /// Gets or sets a value indicating whether throttling is enabled.
 107    /// </summary>
 108    public bool EnableThrottling { get; set; }
 109
 110    /// <summary>
 111    /// Gets or sets the delay after which throttling happens.
 112    /// </summary>
 113    public int ThrottleDelaySeconds { get; set; }
 114
 115    /// <summary>
 116    /// Gets or sets a value indicating whether segment deletion is enabled.
 117    /// </summary>
 118    public bool EnableSegmentDeletion { get; set; }
 119
 120    /// <summary>
 121    /// Gets or sets seconds for which segments should be kept before being deleted.
 122    /// </summary>
 123    public int SegmentKeepSeconds { get; set; }
 124
 125    /// <summary>
 126    /// Gets or sets the hardware acceleration type.
 127    /// </summary>
 128    public HardwareAccelerationType HardwareAccelerationType { get; set; }
 129
 130    /// <summary>
 131    /// Gets or sets the FFmpeg path as set by the user via the UI.
 132    /// </summary>
 133    public string EncoderAppPath { get; set; }
 134
 135    /// <summary>
 136    /// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
 137    /// </summary>
 138    public string EncoderAppPathDisplay { get; set; }
 139
 140    /// <summary>
 141    /// Gets or sets the VA-API device.
 142    /// </summary>
 143    public string VaapiDevice { get; set; }
 144
 145    /// <summary>
 146    /// Gets or sets the QSV device.
 147    /// </summary>
 148    public string QsvDevice { get; set; }
 149
 150    /// <summary>
 151    /// Gets or sets a value indicating whether tonemapping is enabled.
 152    /// </summary>
 153    public bool EnableTonemapping { get; set; }
 154
 155    /// <summary>
 156    /// Gets or sets a value indicating whether VPP tonemapping is enabled.
 157    /// </summary>
 158    public bool EnableVppTonemapping { get; set; }
 159
 160    /// <summary>
 161    /// Gets or sets a value indicating whether videotoolbox tonemapping is enabled.
 162    /// </summary>
 163    public bool EnableVideoToolboxTonemapping { get; set; }
 164
 165    /// <summary>
 166    /// Gets or sets the tone-mapping algorithm.
 167    /// </summary>
 168    public TonemappingAlgorithm TonemappingAlgorithm { get; set; }
 169
 170    /// <summary>
 171    /// Gets or sets the tone-mapping mode.
 172    /// </summary>
 173    public TonemappingMode TonemappingMode { get; set; }
 174
 175    /// <summary>
 176    /// Gets or sets the tone-mapping range.
 177    /// </summary>
 178    public TonemappingRange TonemappingRange { get; set; }
 179
 180    /// <summary>
 181    /// Gets or sets the tone-mapping desaturation.
 182    /// </summary>
 183    public double TonemappingDesat { get; set; }
 184
 185    /// <summary>
 186    /// Gets or sets the tone-mapping peak.
 187    /// </summary>
 188    public double TonemappingPeak { get; set; }
 189
 190    /// <summary>
 191    /// Gets or sets the tone-mapping parameters.
 192    /// </summary>
 193    public double TonemappingParam { get; set; }
 194
 195    /// <summary>
 196    /// Gets or sets the VPP tone-mapping brightness.
 197    /// </summary>
 198    public double VppTonemappingBrightness { get; set; }
 199
 200    /// <summary>
 201    /// Gets or sets the VPP tone-mapping contrast.
 202    /// </summary>
 203    public double VppTonemappingContrast { get; set; }
 204
 205    /// <summary>
 206    /// Gets or sets the H264 CRF.
 207    /// </summary>
 208    public int H264Crf { get; set; }
 209
 210    /// <summary>
 211    /// Gets or sets the H265 CRF.
 212    /// </summary>
 213    public int H265Crf { get; set; }
 214
 215    /// <summary>
 216    /// Gets or sets the encoder preset.
 217    /// </summary>
 218    public EncoderPreset? EncoderPreset { get; set; }
 219
 220    /// <summary>
 221    /// Gets or sets a value indicating whether the framerate is doubled when deinterlacing.
 222    /// </summary>
 223    public bool DeinterlaceDoubleRate { get; set; }
 224
 225    /// <summary>
 226    /// Gets or sets the deinterlace method.
 227    /// </summary>
 228    public DeinterlaceMethod DeinterlaceMethod { get; set; }
 229
 230    /// <summary>
 231    /// Gets or sets a value indicating whether 10bit HEVC decoding is enabled.
 232    /// </summary>
 233    public bool EnableDecodingColorDepth10Hevc { get; set; }
 234
 235    /// <summary>
 236    /// Gets or sets a value indicating whether 10bit VP9 decoding is enabled.
 237    /// </summary>
 238    public bool EnableDecodingColorDepth10Vp9 { get; set; }
 239
 240    /// <summary>
 241    /// Gets or sets a value indicating whether 8/10bit HEVC RExt decoding is enabled.
 242    /// </summary>
 243    public bool EnableDecodingColorDepth10HevcRext { get; set; }
 244
 245    /// <summary>
 246    /// Gets or sets a value indicating whether 12bit HEVC RExt decoding is enabled.
 247    /// </summary>
 248    public bool EnableDecodingColorDepth12HevcRext { get; set; }
 249
 250    /// <summary>
 251    /// Gets or sets a value indicating whether the enhanced NVDEC is enabled.
 252    /// </summary>
 253    public bool EnableEnhancedNvdecDecoder { get; set; }
 254
 255    /// <summary>
 256    /// Gets or sets a value indicating whether the system native hardware decoder should be used.
 257    /// </summary>
 258    public bool PreferSystemNativeHwDecoder { get; set; }
 259
 260    /// <summary>
 261    /// Gets or sets a value indicating whether the Intel H264 low-power hardware encoder should be used.
 262    /// </summary>
 263    public bool EnableIntelLowPowerH264HwEncoder { get; set; }
 264
 265    /// <summary>
 266    /// Gets or sets a value indicating whether the Intel HEVC low-power hardware encoder should be used.
 267    /// </summary>
 268    public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
 269
 270    /// <summary>
 271    /// Gets or sets a value indicating whether hardware encoding is enabled.
 272    /// </summary>
 273    public bool EnableHardwareEncoding { get; set; }
 274
 275    /// <summary>
 276    /// Gets or sets a value indicating whether HEVC encoding is enabled.
 277    /// </summary>
 278    public bool AllowHevcEncoding { get; set; }
 279
 280    /// <summary>
 281    /// Gets or sets a value indicating whether AV1 encoding is enabled.
 282    /// </summary>
 283    public bool AllowAv1Encoding { get; set; }
 284
 285    /// <summary>
 286    /// Gets or sets a value indicating whether subtitle extraction is enabled.
 287    /// </summary>
 288    public bool EnableSubtitleExtraction { get; set; }
 289
 290    /// <summary>
 291    /// Gets or sets the timeout for subtitle extraction in minutes.
 292    /// </summary>
 293    public int SubtitleExtractionTimeoutMinutes { get; set; }
 294
 295    /// <summary>
 296    /// Gets or sets the codecs hardware encoding is used for.
 297    /// </summary>
 298    public string[] HardwareDecodingCodecs { get; set; }
 299
 300    /// <summary>
 301    /// Gets or sets the file extensions on-demand metadata based keyframe extraction is enabled for.
 302    /// </summary>
 303    public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
 304}

Methods/Properties

.ctor()