EncodingOptions.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. // This is the OpenCL device that is used for tonemapping.
  19. // The left side of the dot is the platform number, and the right side is the device number on the platform.
  20. OpenclDevice = "0.0";
  21. EnableTonemapping = false;
  22. EnableVppTonemapping = false;
  23. TonemappingAlgorithm = "hable";
  24. TonemappingRange = "auto";
  25. TonemappingDesat = 0;
  26. TonemappingThreshold = 0.8;
  27. TonemappingPeak = 100;
  28. TonemappingParam = 0;
  29. H264Crf = 23;
  30. H265Crf = 28;
  31. DeinterlaceDoubleRate = false;
  32. DeinterlaceMethod = "yadif";
  33. EnableDecodingColorDepth10Hevc = true;
  34. EnableDecodingColorDepth10Vp9 = true;
  35. EnableEnhancedNvdecDecoder = true;
  36. EnableHardwareEncoding = true;
  37. AllowHevcEncoding = true;
  38. EnableSubtitleExtraction = true;
  39. HardwareDecodingCodecs = new string[] { "h264", "vc1" };
  40. }
  41. public int EncodingThreadCount { get; set; }
  42. public string TranscodingTempPath { get; set; }
  43. public string FallbackFontPath { get; set; }
  44. public bool EnableFallbackFont { get; set; }
  45. public double DownMixAudioBoost { get; set; }
  46. public int MaxMuxingQueueSize { get; set; }
  47. public bool EnableThrottling { get; set; }
  48. public int ThrottleDelaySeconds { get; set; }
  49. public string HardwareAccelerationType { get; set; }
  50. /// <summary>
  51. /// Gets or sets the FFmpeg path as set by the user via the UI.
  52. /// </summary>
  53. public string EncoderAppPath { get; set; }
  54. /// <summary>
  55. /// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
  56. /// </summary>
  57. public string EncoderAppPathDisplay { get; set; }
  58. public string VaapiDevice { get; set; }
  59. public string OpenclDevice { get; set; }
  60. public bool EnableTonemapping { get; set; }
  61. public bool EnableVppTonemapping { get; set; }
  62. public string TonemappingAlgorithm { get; set; }
  63. public string TonemappingRange { get; set; }
  64. public double TonemappingDesat { get; set; }
  65. public double TonemappingThreshold { get; set; }
  66. public double TonemappingPeak { get; set; }
  67. public double TonemappingParam { get; set; }
  68. public int H264Crf { get; set; }
  69. public int H265Crf { get; set; }
  70. public string EncoderPreset { get; set; }
  71. public bool DeinterlaceDoubleRate { get; set; }
  72. public string DeinterlaceMethod { get; set; }
  73. public bool EnableDecodingColorDepth10Hevc { get; set; }
  74. public bool EnableDecodingColorDepth10Vp9 { get; set; }
  75. public bool EnableEnhancedNvdecDecoder { get; set; }
  76. public bool EnableHardwareEncoding { get; set; }
  77. public bool AllowHevcEncoding { get; set; }
  78. public bool EnableSubtitleExtraction { get; set; }
  79. public string[] HardwareDecodingCodecs { get; set; }
  80. }
  81. }