diff options
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 368c0cf32..ee7b9f080 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -799,13 +799,12 @@ namespace MediaBrowser.Controller.MediaEncoding if (videoStream.IsInterlaced) { - if (state.DeInterlace(videoStream.Codec)) + if (state.DeInterlace(videoStream.Codec, false)) { return false; } } - if (videoStream.IsAnamorphic ?? false) { if (request.RequireNonAnamorphic) @@ -1365,7 +1364,7 @@ namespace MediaBrowser.Controller.MediaEncoding filters.Add("hwupload"); } - if (state.DeInterlace("h264") && !string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase)) + if (state.DeInterlace("h264", true) && !string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase)) { // If it is already 60fps then it will create an output framerate that is much too high for roku and others to handle if (string.Equals(options.DeinterlaceMethod, "bobandweave", StringComparison.OrdinalIgnoreCase) && (state.VideoStream.RealFrameRate ?? 60) <= 30) diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs index 450bbf7c1..cf067ddf4 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs @@ -161,7 +161,7 @@ namespace MediaBrowser.Controller.MediaEncoding public int? OutputAudioBitrate; public int? OutputAudioChannels; - public bool DeInterlace(string videoCodec) + public bool DeInterlace(string videoCodec, bool forceDeinterlaceIfSourceIsInterlaced) { // Support general param if (BaseRequest.DeInterlace) @@ -177,6 +177,15 @@ namespace MediaBrowser.Controller.MediaEncoding } } + if (forceDeinterlaceIfSourceIsInterlaced) + { + var videoStream = VideoStream; + if (videoStream != null && videoStream.IsInterlaced) + { + return true; + } + } + return false; } @@ -559,7 +568,7 @@ namespace MediaBrowser.Controller.MediaEncoding return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced; } - if (DeInterlace(ActualOutputVideoCodec)) + if (DeInterlace(ActualOutputVideoCodec, true)) { return false; } |
