Merge pull request #2251 from nyanmisaka/master

add support for AMD AMF hardware encoding on Windows & Linux
This commit is contained in:
dkanada 2020-01-16 15:26:46 +09:00 committed by GitHub
commit 4aa0b940e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 16 deletions

View File

@ -2642,22 +2642,9 @@ namespace MediaBrowser.Controller.MediaEncoding
else
return "-hwaccel dxva2";
}
switch (videoStream.Codec.ToLowerInvariant())
else
{
case "avc":
case "h264":
if (_mediaEncoder.SupportsDecoder("h264_amf") && encodingOptions.HardwareDecodingCodecs.Contains("h264", StringComparer.OrdinalIgnoreCase))
{
return "-c:v h264_amf";
}
break;
case "mpeg2video":
if (_mediaEncoder.SupportsDecoder("hevc_amf") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
{
return "-c:v mpeg2_mmal";
}
break;
return "-hwaccel vaapi";
}
}
}

View File

@ -55,7 +55,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
"h264_vaapi",
"hevc_vaapi",
"h264_v4l2m2m",
"ac3"
"ac3",
"h264_amf",
"hevc_amf"
};
// Try and use the individual library versions to determine a FFmpeg version