diff options
| author | Orry Verducci <orry@orryverducci.co.uk> | 2020-08-10 22:16:46 +0100 |
|---|---|---|
| committer | Orry Verducci <orry@orryverducci.co.uk> | 2020-08-10 22:16:46 +0100 |
| commit | ce51775e7426ff4e037d593715395684ebf9b08a (patch) | |
| tree | 23b7c66f390bca8829fa7a0c7365645d9fff13d6 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | 9dc95074a3b35d00713cbe38eb982e80913f8ab0 (diff) | |
Apply double rate option to hardware deinterlacers
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index c69d31065..9567c90d5 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2120,7 +2120,11 @@ namespace MediaBrowser.Controller.MediaEncoding { if (isVaapiH264Encoder) { - filters.Add(string.Format(CultureInfo.InvariantCulture, "deinterlace_vaapi")); + filters.Add( + string.Format( + CultureInfo.InvariantCulture, + "deinterlace_vaapi=rate={0}", + doubleRateDeinterlace ? "field" : "frame")); } } @@ -2378,6 +2382,11 @@ namespace MediaBrowser.Controller.MediaEncoding if (state.DeInterlace("h264", true)) { inputModifier += " -deint 1"; + + if (!encodingOptions.DeinterlaceDoubleRate || (videoStream?.RealFrameRate ?? 60) > 30) + { + inputModifier += " -drop_second_field 1"; + } } } } |
