EncodingOptions.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 bool EnableThrottling { get; set; }
  13. public int ThrottleDelaySeconds { get; set; }
  14. public string HardwareAccelerationType { get; set; }
  15. /// <summary>
  16. /// FFmpeg path as set by the user via the UI.
  17. /// </summary>
  18. public string EncoderAppPath { get; set; }
  19. /// <summary>
  20. /// The current FFmpeg path being used by the system and displayed on the transcode page.
  21. /// </summary>
  22. public string EncoderAppPathDisplay { get; set; }
  23. public string VaapiDevice { get; set; }
  24. public int H264Crf { get; set; }
  25. public int H265Crf { get; set; }
  26. public string EncoderPreset { get; set; }
  27. public string DeinterlaceMethod { get; set; }
  28. public bool EnableDecodingColorDepth10Hevc { get; set; }
  29. public bool EnableDecodingColorDepth10Vp9 { get; set; }
  30. public bool EnableHardwareEncoding { get; set; }
  31. public bool EnableSubtitleExtraction { get; set; }
  32. public string[] HardwareDecodingCodecs { get; set; }
  33. public EncodingOptions()
  34. {
  35. EnableFallbackFont = false;
  36. DownMixAudioBoost = 2;
  37. EnableThrottling = false;
  38. ThrottleDelaySeconds = 180;
  39. EncodingThreadCount = -1;
  40. // This is a DRM device that is almost guaranteed to be there on every intel platform, plus it's the default one in ffmpeg if you don't specify anything
  41. VaapiDevice = "/dev/dri/renderD128";
  42. H264Crf = 23;
  43. H265Crf = 28;
  44. DeinterlaceMethod = "yadif";
  45. EnableDecodingColorDepth10Hevc = true;
  46. EnableDecodingColorDepth10Vp9 = true;
  47. EnableHardwareEncoding = true;
  48. EnableSubtitleExtraction = true;
  49. HardwareDecodingCodecs = new string[] { "h264", "vc1" };
  50. }
  51. }
  52. }