EncodingOptions.cs 4.2 KB

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