mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
893 B
31 lines
893 B
using ErsatzTV.FFmpeg.Format; |
|
|
|
namespace ErsatzTV.FFmpeg.Preset; |
|
|
|
public static class AvailablePresets |
|
{ |
|
public static ICollection<string> ForAccelAndFormat( |
|
HardwareAccelerationMode hardwareAccelerationMode, |
|
string videoFormat) |
|
{ |
|
return (hardwareAccelerationMode, videoFormat) switch |
|
{ |
|
(HardwareAccelerationMode.Nvenc, VideoFormat.H264 or VideoFormat.Hevc) => |
|
[ |
|
VideoPreset.LowLatencyHighPerformance, VideoPreset.LowLatencyHighQuality |
|
], |
|
|
|
(HardwareAccelerationMode.Qsv, VideoFormat.H264 or VideoFormat.Hevc) => |
|
[ |
|
VideoPreset.VeryFast |
|
], |
|
|
|
(HardwareAccelerationMode.None, VideoFormat.H264 or VideoFormat.Hevc) => |
|
[ |
|
VideoPreset.VeryFast |
|
], |
|
|
|
_ => Array.Empty<string>() |
|
}; |
|
} |
|
}
|
|
|