EncodingOptions.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. namespace MediaBrowser.Model.Configuration
  4. {
  5. public class EncodingOptions
  6. {
  7. public EncodingOptions()
  8. {
  9. EnableFallbackFont = false;
  10. DownMixAudioBoost = 2;
  11. MaxMuxingQueueSize = 2048;
  12. EnableThrottling = false;
  13. EnableSegmentDeletion = false;
  14. ThrottleDelaySeconds = 180;
  15. SegmentKeepSeconds = 200;
  16. EncodingThreadCount = -1;
  17. // This is a DRM device that is almost guaranteed to be there on every intel platform,
  18. // plus it's the default one in ffmpeg if you don't specify anything
  19. VaapiDevice = "/dev/dri/renderD128";
  20. EnableTonemapping = false;
  21. EnableVppTonemapping = false;
  22. TonemappingAlgorithm = "bt2390";
  23. TonemappingRange = "auto";
  24. TonemappingDesat = 0;
  25. TonemappingThreshold = 0.8;
  26. TonemappingPeak = 100;
  27. TonemappingParam = 0;
  28. VppTonemappingBrightness = 0;
  29. VppTonemappingContrast = 1.2;
  30. H264Crf = 23;
  31. H265Crf = 28;
  32. DeinterlaceDoubleRate = false;
  33. DeinterlaceMethod = "yadif";
  34. EnableDecodingColorDepth10Hevc = true;
  35. EnableDecodingColorDepth10Vp9 = true;
  36. EnableEnhancedNvdecDecoder = false;
  37. PreferSystemNativeHwDecoder = true;
  38. EnableIntelLowPowerH264HwEncoder = false;
  39. EnableIntelLowPowerHevcHwEncoder = false;
  40. EnableHardwareEncoding = true;
  41. AllowHevcEncoding = false;
  42. EnableSubtitleExtraction = true;
  43. AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
  44. HardwareDecodingCodecs = new string[] { "h264", "vc1" };
  45. }
  46. public int EncodingThreadCount { get; set; }
  47. public string TranscodingTempPath { get; set; }
  48. public string FallbackFontPath { get; set; }
  49. public bool EnableFallbackFont { get; set; }
  50. public double DownMixAudioBoost { get; set; }
  51. public int MaxMuxingQueueSize { get; set; }
  52. public bool EnableThrottling { get; set; }
  53. public bool EnableSegmentDeletion { get; set; }
  54. public int ThrottleDelaySeconds { get; set; }
  55. public int SegmentKeepSeconds { get; set; }
  56. public string HardwareAccelerationType { get; set; }
  57. /// <summary>
  58. /// Gets or sets the FFmpeg path as set by the user via the UI.
  59. /// </summary>
  60. public string EncoderAppPath { get; set; }
  61. /// <summary>
  62. /// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
  63. /// </summary>
  64. public string EncoderAppPathDisplay { get; set; }
  65. public string VaapiDevice { get; set; }
  66. public bool EnableTonemapping { get; set; }
  67. public bool EnableVppTonemapping { get; set; }
  68. public string TonemappingAlgorithm { get; set; }
  69. public string TonemappingRange { get; set; }
  70. public double TonemappingDesat { get; set; }
  71. public double TonemappingThreshold { get; set; }
  72. public double TonemappingPeak { get; set; }
  73. public double TonemappingParam { get; set; }
  74. public double VppTonemappingBrightness { get; set; }
  75. public double VppTonemappingContrast { get; set; }
  76. public int H264Crf { get; set; }
  77. public int H265Crf { get; set; }
  78. public string EncoderPreset { get; set; }
  79. public bool DeinterlaceDoubleRate { get; set; }
  80. public string DeinterlaceMethod { get; set; }
  81. public bool EnableDecodingColorDepth10Hevc { get; set; }
  82. public bool EnableDecodingColorDepth10Vp9 { get; set; }
  83. public bool EnableEnhancedNvdecDecoder { get; set; }
  84. public bool PreferSystemNativeHwDecoder { get; set; }
  85. public bool EnableIntelLowPowerH264HwEncoder { get; set; }
  86. public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
  87. public bool EnableHardwareEncoding { get; set; }
  88. public bool AllowHevcEncoding { get; set; }
  89. public bool EnableSubtitleExtraction { get; set; }
  90. public string[] HardwareDecodingCodecs { get; set; }
  91. public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
  92. }
  93. }