EncodingOptions.cs 3.4 KB

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