2
0

EncodingOptions.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 EnableSubtitleExtraction { get; set; }
  42. public string[] HardwareDecodingCodecs { get; set; }
  43. public EncodingOptions()
  44. {
  45. EnableFallbackFont = false;
  46. DownMixAudioBoost = 2;
  47. MaxMuxingQueueSize = 2048;
  48. EnableThrottling = false;
  49. ThrottleDelaySeconds = 180;
  50. EncodingThreadCount = -1;
  51. // This is a DRM device that is almost guaranteed to be there on every intel platform,
  52. // plus it's the default one in ffmpeg if you don't specify anything
  53. VaapiDevice = "/dev/dri/renderD128";
  54. // This is the OpenCL device that is used for tonemapping.
  55. // The left side of the dot is the platform number, and the right side is the device number on the platform.
  56. OpenclDevice = "0.0";
  57. EnableTonemapping = false;
  58. TonemappingAlgorithm = "reinhard";
  59. TonemappingRange = "auto";
  60. TonemappingDesat = 0;
  61. TonemappingThreshold = 0.8;
  62. TonemappingPeak = 0;
  63. TonemappingParam = 0;
  64. H264Crf = 23;
  65. H265Crf = 28;
  66. DeinterlaceDoubleRate = false;
  67. DeinterlaceMethod = "yadif";
  68. EnableDecodingColorDepth10Hevc = true;
  69. EnableDecodingColorDepth10Vp9 = true;
  70. EnableHardwareEncoding = true;
  71. EnableSubtitleExtraction = true;
  72. HardwareDecodingCodecs = new string[] { "h264", "vc1" };
  73. }
  74. }
  75. }