mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #2251 from nyanmisaka/master
add support for AMD AMF hardware encoding on Windows & Linux
This commit is contained in:
commit
4aa0b940e3
@ -2642,22 +2642,9 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
else
|
else
|
||||||
return "-hwaccel dxva2";
|
return "-hwaccel dxva2";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
switch (videoStream.Codec.ToLowerInvariant())
|
|
||||||
{
|
{
|
||||||
case "avc":
|
return "-hwaccel vaapi";
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
"h264_vaapi",
|
"h264_vaapi",
|
||||||
"hevc_vaapi",
|
"hevc_vaapi",
|
||||||
"h264_v4l2m2m",
|
"h264_v4l2m2m",
|
||||||
"ac3"
|
"ac3",
|
||||||
|
"h264_amf",
|
||||||
|
"hevc_amf"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Try and use the individual library versions to determine a FFmpeg version
|
// Try and use the individual library versions to determine a FFmpeg version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user