aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Configuration/EncodingOptions.cs
blob: 38b3335107768a7872721072b4d03fc53c31ac00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#nullable disable
#pragma warning disable CS1591

namespace MediaBrowser.Model.Configuration
{
    public class EncodingOptions
    {
        public int EncodingThreadCount { get; set; }

        public string TranscodingTempPath { get; set; }

        public string FallbackFontPath { get; set; }

        public bool EnableFallbackFont { get; set; }

        public double DownMixAudioBoost { get; set; }

        public int MaxMuxingQueueSize { get; set; }

        public bool EnableThrottling { get; set; }

        public int ThrottleDelaySeconds { get; set; }

        public string HardwareAccelerationType { get; set; }

        /// <summary>
        /// FFmpeg path as set by the user via the UI.
        /// </summary>
        public string EncoderAppPath { get; set; }

        /// <summary>
        /// The current FFmpeg path being used by the system and displayed on the transcode page.
        /// </summary>
        public string EncoderAppPathDisplay { get; set; }

        public string VaapiDevice { get; set; }

        public string OpenclDevice { get; set; }

        public bool EnableTonemapping { get; set; }

        public string TonemappingAlgorithm { get; set; }

        public string TonemappingRange { get; set; }

        public double TonemappingDesat { get; set; }

        public double TonemappingThreshold { get; set; }

        public double TonemappingPeak { get; set; }

        public double TonemappingParam { get; set; }

        public int H264Crf { get; set; }

        public int H265Crf { get; set; }

        public string EncoderPreset { get; set; }

        public bool DeinterlaceDoubleRate { get; set; }

        public string DeinterlaceMethod { get; set; }

        public bool EnableDecodingColorDepth10Hevc { get; set; }

        public bool EnableDecodingColorDepth10Vp9 { get; set; }

        public bool EnableHardwareEncoding { get; set; }

        public bool AllowHevcEncoding { get; set; }

        public bool EnableSubtitleExtraction { get; set; }

        public string[] HardwareDecodingCodecs { get; set; }

        public EncodingOptions()
        {
            EnableFallbackFont = false;
            DownMixAudioBoost = 2;
            MaxMuxingQueueSize = 2048;
            EnableThrottling = false;
            ThrottleDelaySeconds = 180;
            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";
            // This is the OpenCL device that is used for tonemapping.
            // The left side of the dot is the platform number, and the right side is the device number on the platform.
            OpenclDevice = "0.0";
            EnableTonemapping = false;
            TonemappingAlgorithm = "hable";
            TonemappingRange = "auto";
            TonemappingDesat = 0;
            TonemappingThreshold = 0.8;
            TonemappingPeak = 100;
            TonemappingParam = 0;
            H264Crf = 23;
            H265Crf = 28;
            DeinterlaceDoubleRate = false;
            DeinterlaceMethod = "yadif";
            EnableDecodingColorDepth10Hevc = true;
            EnableDecodingColorDepth10Vp9 = true;
            EnableHardwareEncoding = true;
            AllowHevcEncoding = true;
            EnableSubtitleExtraction = true;
            HardwareDecodingCodecs = new string[] { "h264", "vc1" };
        }
    }
}