EncodingOptions.cs 3.2 KB

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