EncodingOptions.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 int H264Crf { get; set; }
  23. public int H265Crf { get; set; }
  24. public string EncoderPreset { get; set; }
  25. public string DeinterlaceMethod { get; set; }
  26. public bool EnableDecodingColorDepth10 { get; set; }
  27. public bool EnableHardwareEncoding { get; set; }
  28. public bool EnableSubtitleExtraction { get; set; }
  29. public string[] HardwareDecodingCodecs { get; set; }
  30. public EncodingOptions()
  31. {
  32. DownMixAudioBoost = 2;
  33. EnableThrottling = false;
  34. ThrottleDelaySeconds = 180;
  35. EncodingThreadCount = -1;
  36. // 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
  37. VaapiDevice = "/dev/dri/renderD128";
  38. H264Crf = 23;
  39. H265Crf = 28;
  40. DeinterlaceMethod = "yadif";
  41. EnableDecodingColorDepth10 = true;
  42. EnableHardwareEncoding = true;
  43. EnableSubtitleExtraction = true;
  44. HardwareDecodingCodecs = new string[] { "h264", "vc1" };
  45. }
  46. }
  47. }