Browse Source

disable autoscale when looping with vaapi or qsv (#494)

pull/495/head
Jason Dove 5 years ago committed by GitHub
parent
commit
fb8c3a0453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      ErsatzTV.Core/FFmpeg/FFmpegProcessBuilder.cs

12
ErsatzTV.Core/FFmpeg/FFmpegProcessBuilder.cs

@ -42,6 +42,7 @@ namespace ErsatzTV.Core.FFmpeg
private string _vaapiDevice; private string _vaapiDevice;
private HardwareAccelerationKind _hwAccel; private HardwareAccelerationKind _hwAccel;
private string _outputPixelFormat; private string _outputPixelFormat;
private bool _noAutoScale;
public FFmpegProcessBuilder(string ffmpegPath, bool saveReports, ILogger logger) public FFmpegProcessBuilder(string ffmpegPath, bool saveReports, ILogger logger)
{ {
@ -147,6 +148,11 @@ namespace ErsatzTV.Core.FFmpeg
{ {
_arguments.Add("-stream_loop"); _arguments.Add("-stream_loop");
_arguments.Add("-1"); _arguments.Add("-1");
if (_hwAccel is HardwareAccelerationKind.Qsv or HardwareAccelerationKind.Vaapi)
{
_noAutoScale = true;
}
} }
return this; return this;
@ -460,6 +466,12 @@ namespace ErsatzTV.Core.FFmpeg
}); });
_arguments.AddRange(arguments); _arguments.AddRange(arguments);
if (_noAutoScale)
{
_arguments.Add("-noautoscale");
}
return this; return this;
} }

Loading…
Cancel
Save