EncodingOptions.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 int MaxMuxingQueueSize { get; set; }
  11. public bool EnableThrottling { get; set; }
  12. public int ThrottleDelaySeconds { get; set; }
  13. public string HardwareAccelerationType { get; set; }
  14. /// <summary>
  15. /// FFmpeg path as set by the user via the UI.
  16. /// </summary>
  17. public string EncoderAppPath { get; set; }
  18. /// <summary>
  19. /// The current FFmpeg path being used by the system and displayed on the transcode page.
  20. /// </summary>
  21. public string EncoderAppPathDisplay { get; set; }
  22. public string VaapiDevice { get; set; }
  23. public int H264Crf { get; set; }
  24. public int H265Crf { get; set; }
  25. public string EncoderPreset { get; set; }
  26. public bool DeinterlaceDoubleRate { 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. DownMixAudioBoost = 2;
  36. MaxMuxingQueueSize = 2048;
  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. DeinterlaceDoubleRate = false;
  45. DeinterlaceMethod = "yadif";
  46. EnableDecodingColorDepth10Hevc = true;
  47. EnableDecodingColorDepth10Vp9 = true;
  48. EnableHardwareEncoding = true;
  49. EnableSubtitleExtraction = true;
  50. HardwareDecodingCodecs = new string[] { "h264", "vc1" };
  51. }
  52. }
  53. }