aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-02-15 14:35:07 +0100
committerJoshua M. Boniface <joshua@boniface.me>2021-02-21 13:30:31 -0500
commitbe7411dc58d4f88b74175463adec361a330596bc (patch)
tree14606f30a29551e9dbddb2c0d509fd2eb55d8a92 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
parentb2a8fd82d89684dee1b6848715e5aff28ae36798 (diff)
Merge pull request #5230 from orryverducci/double-rate-deint-fix
Fix double rate deinterlacing for some TS files (cherry picked from commit 32934cb33dd4e2b1ec98e7c9950f9fec835438c0) Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 07a9f5ba6..3b7ae4c32 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -2530,7 +2530,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
// If double rate deinterlacing is enabled and the input framerate is 30fps or below, otherwise the output framerate will be too high for many devices
- var doubleRateDeinterlace = options.DeinterlaceDoubleRate && (videoStream?.RealFrameRate ?? 60) <= 30;
+ var doubleRateDeinterlace = options.DeinterlaceDoubleRate && (videoStream?.AverageFrameRate ?? 60) <= 30;
var isScalingInAdvance = false;
var isCudaDeintInAdvance = false;
@@ -3080,7 +3080,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
inputModifier += " -deint 1";
- if (!encodingOptions.DeinterlaceDoubleRate || (videoStream?.RealFrameRate ?? 60) > 30)
+ if (!encodingOptions.DeinterlaceDoubleRate || (videoStream?.AverageFrameRate ?? 60) > 30)
{
inputModifier += " -drop_second_field 1";
}