< 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: 45
Uncovered lines: 0
Coverable lines: 45
Total lines: 313
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 3/16/2026 - 12:14:00 AM Line coverage: 100% (44/44) Total lines: 3126/4/2026 - 12:15:59 AM Line coverage: 100% (45/45) Total lines: 313

Coverage delta

Coverage delta 1 -1

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

Methods/Properties

.ctor()