From f86582689b9f790dc45901418f6f7cfe5aca57a4 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 4 Dec 2017 19:41:59 +0100 Subject: [PATCH] Only transcode 10bit video for h265 - Fixes #367 --- resources/lib/playutils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 5cfbadd9..84eda6e0 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -130,15 +130,16 @@ class PlayUtils(): if window('plex_forcetranscode') == 'true': log.info('User chose to force-transcode') return True - if (settings('transcodeHi10P') == 'true' and - videoCodec['bitDepth'] == '10'): - log.info('Option to transcode 10bit video content enabled.') - return True codec = videoCodec['videocodec'] if codec is None: # e.g. trailers. Avoids TypeError with "'h265' in codec" log.info('No codec from PMS, not transcoding.') return False + if ((settings('transcodeHi10P') == 'true' and + videoCodec['bitDepth'] == '10') and + ('h265' in codec or 'hevc' in codec)): + log.info('Option to transcode 10bit h265 video content enabled.') + return True try: bitrate = int(videoCodec['bitrate']) except (TypeError, ValueError):