mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-11 11:24:02 +00:00
exclude mpeg4 with level -99 from vaapi
This commit is contained in:
parent
b1f604b5e7
commit
ccaf2f43a6
3 changed files with 41 additions and 3 deletions
|
|
@ -588,13 +588,32 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
}
|
||||
if (string.Equals(hwType, "vaapi", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(options.VaapiDevice))
|
||||
{
|
||||
return GetAvailableEncoder(mediaEncoder, "h264_vaapi", defaultEncoder);
|
||||
if (IsVaapiSupported(state))
|
||||
{
|
||||
return GetAvailableEncoder(mediaEncoder, "h264_vaapi", defaultEncoder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return defaultEncoder;
|
||||
}
|
||||
|
||||
private static bool IsVaapiSupported(EncodingJob state)
|
||||
{
|
||||
var videoStream = state.VideoStream;
|
||||
|
||||
if (videoStream != null)
|
||||
{
|
||||
// vaapi will throw an error with this input
|
||||
// [vaapi @ 0x7faed8000960] No VAAPI support for codec mpeg4 profile -99.
|
||||
if (string.Equals(videoStream.Codec, "mpeg4", StringComparison.OrdinalIgnoreCase) && videoStream.Level == -99)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static bool CanStreamCopyVideo(EncodingJobOptions request, MediaStream videoStream)
|
||||
{
|
||||
if (videoStream.IsInterlaced)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue