EncodingOptions.cs 4.1 KB

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