< 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: 44
Uncovered lines: 0
Coverable lines: 44
Total lines: 312
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 10/18/2025 - 12:10:13 AM Line coverage: 100% (42/42) Total lines: 29812/3/2025 - 12:11:26 AM Line coverage: 100% (43/43) Total lines: 3041/19/2026 - 12:13:54 AM Line coverage: 100% (44/44) Total lines: 312

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

Methods/Properties

.ctor()