2
0

EncodingOptions.cs 3.8 KB

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