Update EncodingHelper.cs

Fix the problem that hardware decoding cannot be used on macOS.
pull/3711/head
不帅你报警 4 years ago committed by GitHub
parent 8ab800508b
commit d5dcb12407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -456,6 +456,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var isQsvEncoder = outputVideoCodec.IndexOf("qsv", StringComparison.OrdinalIgnoreCase) != -1;
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
var isMacOS = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
if (!IsCopyCodec(outputVideoCodec))
{
@ -511,6 +512,12 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
}
if (state.IsVideoRequest
&& string.Equals(encodingOptions.HardwareAccelerationType, "videotoolbox", StringComparison.OrdinalIgnoreCase))
{
arg.Append("-hwaccel videotoolbox ");
}
}
arg.Append("-i ")

Loading…
Cancel
Save