change framerate normalization method (#611)
This commit is contained in:
@@ -28,7 +28,6 @@ namespace ErsatzTV.Core.FFmpeg
|
||||
private string _videoEncoder;
|
||||
private Option<string> _subtitle;
|
||||
private bool _boxBlur;
|
||||
private Option<int> _frameRate;
|
||||
|
||||
public FFmpegComplexFilterBuilder WithHardwareAcceleration(HardwareAccelerationKind hardwareAccelerationKind)
|
||||
{
|
||||
@@ -86,12 +85,6 @@ namespace ErsatzTV.Core.FFmpeg
|
||||
return this;
|
||||
}
|
||||
|
||||
public FFmpegComplexFilterBuilder WithFrameRate(Option<int> frameRate)
|
||||
{
|
||||
_frameRate = frameRate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FFmpegComplexFilterBuilder WithWatermark(
|
||||
Option<ChannelWatermark> watermark,
|
||||
Option<List<FadePoint>> maybeFadePoints,
|
||||
@@ -247,8 +240,6 @@ namespace ErsatzTV.Core.FFmpeg
|
||||
videoFilterQueue.Add("format=nv12|vaapi,hwupload");
|
||||
}
|
||||
|
||||
videoFilterQueue.AddRange(_frameRate.Select(frameRate => $"fps=fps={frameRate}"));
|
||||
|
||||
_scaleToSize.IfSome(
|
||||
size =>
|
||||
{
|
||||
|
||||
@@ -216,7 +216,15 @@ namespace ErsatzTV.Core.FFmpeg
|
||||
|
||||
public FFmpegProcessBuilder WithFrameRate(Option<int> frameRate)
|
||||
{
|
||||
_complexFilterBuilder = _complexFilterBuilder.WithFrameRate(frameRate);
|
||||
foreach (int fr in frameRate)
|
||||
{
|
||||
_arguments.Add("-r");
|
||||
_arguments.Add($"{fr}");
|
||||
|
||||
_arguments.Add("-vsync");
|
||||
_arguments.Add("1");
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user