EncodingOptions.cs 3.0 KB

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