fixes #219 - [Bug] Missing hardware device reference in convert job with vaapi transcoding

pull/702/head
Luke Pulverenti 8 years ago
parent 643bf13bbe
commit c5c8426c20

@ -481,6 +481,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
} }
} }
if (state.IsVideoRequest)
{
var encodingOptions = GetEncodingOptions();
var videoEncoder = EncodingJobFactory.GetVideoEncoder(MediaEncoder, state, encodingOptions);
if (videoEncoder.IndexOf("vaapi", StringComparison.OrdinalIgnoreCase) != -1)
{
arg = "-hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device " + encodingOptions.VaapiDevice + " " + arg;
}
}
return arg.Trim(); return arg.Trim();
} }

Loading…
Cancel
Save