From d57f8ddde3f60ed1e7670c22083aab6330fce562 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 2 Dec 2015 04:58:20 -0600 Subject: [PATCH] Force transcode 1080p/h265 --- resources/lib/PlayUtils.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/lib/PlayUtils.py b/resources/lib/PlayUtils.py index c902298f..14a36b7f 100644 --- a/resources/lib/PlayUtils.py +++ b/resources/lib/PlayUtils.py @@ -59,6 +59,11 @@ class PlayUtils(): self.logMsg("Can't direct play: Play from HTTP is enabled.", 1) return False + # Avoid H265 1080p + if result['MediaSources'][0]['Name'].startswith("1080P/H265"): + self.logMsg("Skip direct play for 1080P/H265 since format playback is not stable.", 1) + return False + canDirectPlay = result['MediaSources'][0]['SupportsDirectPlay'] # Make sure it's supported by server if not canDirectPlay: @@ -124,6 +129,12 @@ class PlayUtils(): def isDirectStream(self, result): # Requirements for Direct stream: # FileSystem or Remote, BitRate, supported encoding + + # Avoid H265 1080p + if item['MediaSources'][0]['Name'].startswith("1080P/H265"): + self.logMsg("Skip direct stream for 1080P/H265 since format playback is not stable.", 1) + return False + canDirectStream = result['MediaSources'][0]['SupportsDirectStream'] # Make sure it's supported by server if not canDirectStream: