v18 [Linux] How to force Plex to transcode instead of direct play
#1
Hello,

I have limited internet bandwidth and thus want Plex to transcode all videos instead of direct play. I use the following setting in Plex addon,

Image

Unfortunately, if i try to play a 1080p video Plex still uses 'Direct Play' to play the video. How can i force a transcode?

The kodi log file shows this:
Code:
2020-02-14 07:24:43.306 T:139751816410880  NOTICE: script.plex: VideoPlayerWindow: Starting session (ID: 139752736570160)
2020-02-14 07:24:43.306 T:139751816410880  NOTICE: script.plex: API: Choice media: 1080p, 9.1 Mbps container=mkv videoCodec=h264 audioCodec=ac3 audioChannels=6 id=16927 part:0
2020-02-14 07:24:43.306 T:139751816410880  NOTICE: script.plex: API: Choice videoStream: <plexnet.plexstream.PlexStream object at 0x7f1ae04452d0>
2020-02-14 07:24:43.306 T:139751816410880  NOTICE: script.plex: API: Choice audioStream: <plexnet.plexstream.PlexStream object at 0x7f1aaea076d0>
2020-02-14 07:24:43.306 T:139751816410880  NOTICE: script.plex: API: Choice subtitleStream: <plexnet.plexstream.PlexStream object at 0x7f1ae01722d0>
2020-02-14 07:24:43.307 T:139751816410880  NOTICE: script.plex: API: MDE: MediaChoice: direct playable=True version=1080p, 9.1 Mbps container=mkv videoCodec=h264 audioCodec=ac3 audioChannels=6 id=16927
2020-02-14 07:24:43.307 T:139751816410880  NOTICE: script.plex: API: Forced Transcode; allowDirectStream=False
2020-02-14 07:24:43.307 T:139751816410880  NOTICE: script.plex: API: DEBUG: buildDirectPlay()
2020-02-14 07:24:43.307 T:139751816410880  NOTICE: script.plex: API: Constructed video item for playback: {'playStart': 0, 'frameRate': 24, 'duration': 9808352, 'streamBitrates': [9106], 'partIndex': 0, 'subtitleConfig': {'TrackName': 'mkv/7'}, 'streamQualities': ['SD'], 'fullHD': True, 'startOffset': 0, 'streamUrls': [u'https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/library/parts/16970/1530673085/file.mkv?X-Plex-Token=2JPtJetHia_ye7Hs3b4n'], 'isRequestToServer': True, 'live': False, 'streamFormat': 'mkv', 'prevObj': None, 'token': '2JPtJetHia_ye7Hs3b4n', 'partDuration': 9808352, 'isTranscoded': False, 'audioLanguageSelected': u'hin'}
2020-02-14 07:24:43.307 T:139751816410880  NOTICE: script.plex: API: DEBUG: buildTranscode()
2020-02-14 07:24:43.307 T:139751816410880  NOTICE: script.plex: API: DEBUG: buildTranscodeMkv()
2020-02-14 07:24:43.307 T:139751816410880  NOTICE: script.plex: API:  ---TEST: TEST==========================
2020-02-14 07:24:43.307 T:139751816410880  NOTICE: script.plex: API:  ---TEST: /video/:/transcode/universal/decision?X-Plex-Token=2JPtJetHia_ye7Hs3b4n&copyts=1&subtitles=burn&path=%2Flibrary%2Fmetadata%2F7439&offset=0&session=a6de5bca-7466-4b24-bc86-1606c441682b&directStream=1&directPlay=0&videoQuality=100&videoResolution=1920x1080&maxVideoBitrate=200000&mediaIndex=0&partIndex=0&X-Plex-Client-Profile-Extra=append-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Dac3%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Dac3%29%2Bappend-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Deac3%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Deac3%29%2Bappend-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Ddca%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Ddca%29%2Badd-limitation%28scope%3DvideoAudioCodec%26scopeName%3Ddca%26type%3DupperBound%26name%3Daudio.channels%26value%3D6%26isRequired%3Dfalse%29%2Bappend-transcode-target-codec%28type%3DvideoProfile%26context%3Dstreaming%26videoCodec%3Dvp9%29
2020-02-14 07:24:43.308 T:139751816410880  NOTICE: script.plex: API: Starting request: GET https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/video/:/transcode/universal/decision?X-Plex-Token=****&copyts=1&path=%2Flibrary%2Fmetadata%2F7439&offset=0&session=a6de5bca-7466-4b24-bc86-1606c441682b&directStream=1&directPlay=1&videoQuality=100&videoResolution=1920x1080&maxVideoBitrate=200000&mediaIndex=0&partIndex=0&X-Plex-Client-Profile-Extra=append-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Dac3%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Dac3%29%2Bappend-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Deac3%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Deac3%29%2Bappend-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Ddca%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Ddca%29%2Badd-limitation%28scope%3DvideoAudioCodec%26scopeName%3Ddca%26type%3DupperBound%26name%3Daudio.channels%26value%3D6%26isRequired%3Dfalse%29%2Bappend-transcode-target-codec%28type%3DvideoProfile%26context%3Dstreaming%26videoCodec%3Dvp9%29&subtitles=sidecar&mediaBufferSize=20971&hasMDE=1&X-Plex-Platform=Chrome&X-Plex-Token=**** (async=False timeout=10)
2020-02-14 07:24:43.547 T:139751816410880  NOTICE: script.plex: API: Got a 400 from https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/video/:/transcode/universal/decision?X-Plex-Token=****&copyts=1&path=%2Flibrary%2Fmetadata%2F7439&offset=0&session=a6de5bca-7466-4b24-bc86-1606c441682b&directStream=1&directPlay=1&videoQuality=100&videoResolution=1920x1080&maxVideoBitrate=200000&mediaIndex=0&partIndex=0&X-Plex-Client-Profile-Extra=append-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Dac3%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Dac3%29%2Bappend-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Deac3%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Deac3%29%2Bappend-transcode-target-audio-codec%28type%3DvideoProfile%26context%3Dstreaming%26audioCodec%3Ddca%29%2Badd-direct-play-profile%28type%3DvideoProfile%26container%3Dmatroska%26videoCodec%3D%2A%26audioCodec%3Ddca%29%2Badd-limitation%28scope%3DvideoAudioCodec%26scopeName%3Ddca%26type%3DupperBound%26name%3Daudio.channels%26value%3D6%26isRequired%3Dfalse%29%2Bappend-transcode-target-codec%28type%3DvideoProfile%26context%3Dstreaming%26videoCodec%3Dvp9%29&subtitles=sidecar&mediaBufferSize=20971&hasMDE=1&X-Plex-Platform=Chrome&X-Plex-Token=****
2020-02-14 07:24:43.548 T:139751816410880  NOTICE: script.plex: API: WARNING: MDE: Server failed to provide a decision
2020-02-14 07:24:43.548 T:139751816410880  NOTICE: script.plex: Playing URL(+0ms): https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/library/parts/16970/1530673085/file.mkv?X-Plex-Token=****
2020-02-14 07:24:43.636 T:139751816410880   ERROR: EXCEPTION: Non-Existent Control 200
2020-02-14 07:24:43.636 T:139751816410880   ERROR: script.plex: ERROR:  - Non-Existent Control 200
2020-02-14 07:24:43.636 T:139751816410880   ERROR: EXCEPTION: Non-Existent Control 200
2020-02-14 07:24:43.636 T:139751816410880   ERROR: script.plex: ERROR:  - Non-Existent Control 200
2020-02-14 07:24:43.898 T:139754970153408  NOTICE: VideoPlayer::OpenFile: https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/library/parts/16970/1530673085/file.mkv?X-Plex-Token=2JPtJetHia_ye7Hs3b4n&X-Plex-Client-Identifier=a6de5bca-7466-4b24-bc86-1606c441682b&X-Plex-Platform=Chrome
2020-02-14 07:24:43.959 T:139753093572352  NOTICE: Creating InputStream
2020-02-14 07:24:43.966 T:139751816410880  NOTICE: script.plex: Player - STARTED
2020-02-14 07:24:43.966 T:139751816410880  NOTICE: script.plex: SeekHandler: onPlayBackStarted - mode=0
2020-02-14 07:24:43.996 T:139753462687488  NOTICE: script.plex: Monitoring pre-play...
2020-02-14 07:24:43.996 T:139753462687488  NOTICE: script.plex: Player - PRE-PLAY
2020-02-14 07:24:44.077 T:139752330229504  NOTICE: script.plex: API: Starting request: GET https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/:/timeline?containerKey=/library/sections/3/all%3Fsort%3DviewUpdatedAt%3Adesc%26viewOffset%3E%3D300%26viewUpdatedAt%3E%3D1571968479&ratingKey=7439&state=playing&key=/library/metadata/7439&time=16600&duration=9808352&guid=com.plexapp.agents.imdb%3A//tt5935704%3Flang%3Den&X-Plex-Token=**** (async=True timeout=10.0(10))
2020-02-14 07:24:44.390 T:139753093572352  NOTICE: Creating Demuxer
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: Opening stream: 0 source: 256
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: Creating video codec with codec id: 27
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: Creating video thread
2020-02-14 07:24:45.957 T:139752288388864  NOTICE: running thread: video_thread
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: Opening stream: 1 source: 256
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: Finding audio codec for: 86019
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder ac3
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: Creating audio thread
2020-02-14 07:24:45.957 T:139753093572352  NOTICE: Opening stream: 6 source: 256
2020-02-14 07:24:45.957 T:139752279996160  NOTICE: running thread: CVideoPlayerAudio::Process()
2020-02-14 07:24:45.959 T:139751860467456  NOTICE: COutput::OnStartup: Output Thread created
2020-02-14 07:24:45.976 T:139753462687488  NOTICE: script.plex: Monitoring video...
2020-02-14 07:24:45.976 T:139752279996160  NOTICE: Creating audio stream (codec id: 86019, channels: 6, sample rate: 48000, no pass-through)
2020-02-14 07:24:46.157 T:139754970153408  NOTICE: GL: Selecting YUV 2 RGB shader
2020-02-14 07:24:46.157 T:139754970153408  NOTICE: GL: NPOT texture support detected
2020-02-14 07:24:46.157 T:139754970153408  NOTICE: GL: Using GL_ARB_pixel_buffer_object
2020-02-14 07:24:46.157 T:139754970153408  NOTICE: Using GL_TEXTURE_2D
2020-02-14 07:24:46.188 T:139754970153408  NOTICE: GL: Selecting YUV 2 RGB shader
2020-02-14 07:24:46.189 T:139754970153408  NOTICE: GL: NPOT texture support detected
2020-02-14 07:24:46.189 T:139754970153408  NOTICE: GL: Using GL_ARB_pixel_buffer_object
2020-02-14 07:24:46.254 T:139753462687488  NOTICE: script.plex: Player: Video window opened
2020-02-14 07:24:46.406 T:139753462687488  NOTICE: script.plex: Enabling embedded subtitles at: 4
2020-02-14 07:24:46.406 T:139753462687488  NOTICE: script.plex: Kodi reported subtitles: ['chi', 'chi', 'chi', 'chi', 'eng']
2020-02-14 07:24:46.406 T:139753462687488  NOTICE: script.plex: Audio track is correct index: 0
2020-02-14 07:24:46.416 T:139753093572352  NOTICE: Closing stream player 3
2020-02-14 07:24:46.416 T:139753093572352  NOTICE: Opening stream: 6 source: 256
2020-02-14 07:24:46.616 T:139752288388864  NOTICE: CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: 41636
2020-02-14 07:25:00.005 T:139752575600384  NOTICE: script.plex: API: Starting request: GET https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/:/timeline?containerKey=/library/sections/3/all%3Fsort%3DviewUpdatedAt%3Adesc%26viewOffset%3E%3D300%26viewUpdatedAt%3E%3D1571968479&ratingKey=7439&state=playing&key=/library/metadata/7439&time=13468&duration=9808352&guid=com.plexapp.agents.imdb%3A//tt5935704%3Flang%3Den&X-Plex-Token=**** (async=True timeout=10.0(10))
2020-02-14 07:25:16.105 T:139752575600384  NOTICE: script.plex: API: Starting request: GET https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/:/timeline?containerKey=/library/sections/3/all%3Fsort%3DviewUpdatedAt%3Adesc%26viewOffset%3E%3D300%26viewUpdatedAt%3E%3D1571968479&ratingKey=7439&state=playing&key=/library/metadata/7439&time=29478&duration=9808352&guid=com.plexapp.agents.imdb%3A//tt5935704%3Flang%3Den&X-Plex-Token=**** (async=True timeout=10.0(10))
2020-02-14 07:25:31.205 T:139752575600384  NOTICE: script.plex: API: Starting request: GET https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/:/timeline?containerKey=/library/sections/3/all%3Fsort%3DviewUpdatedAt%3Adesc%26viewOffset%3E%3D300%26viewUpdatedAt%3E%3D1571968479&ratingKey=7439&state=playing&key=/library/metadata/7439&time=44638&duration=9808352&guid=com.plexapp.agents.imdb%3A//tt5935704%3Flang%3Den&X-Plex-Token=**** (async=True timeout=10.0(10))
2020-02-14 07:25:46.289 T:139752575600384  NOTICE: script.plex: API: Starting request: GET https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/:/timeline?containerKey=/library/sections/3/all%3Fsort%3DviewUpdatedAt%3Adesc%26viewOffset%3E%3D300%26viewUpdatedAt%3E%3D1571968479&ratingKey=7439&state=playing&key=/library/metadata/7439&time=59808&duration=9808352&guid=com.plexapp.agents.imdb%3A//tt5935704%3Flang%3Den&X-Plex-Token=**** (async=True timeout=10.0(10))
2020-02-14 07:26:01.555 T:139752575600384  NOTICE: script.plex: API: Starting request: GET https://99-99-99-99.0cce97f856924927aa5c0b8898fb999d.plex.direct:32400/:/timeline?containerKey=/library/sections/3/all%3Fsort%3DviewUpdatedAt%3Adesc%26viewOffset%3E%3D300%26viewUpdatedAt%3E%3D1571968479&ratingKey=7439&state=playing&key=/library/metadata/7439&time=75008&duration=9808352&guid=com.plexapp.agents.imdb%3A//tt5935704%3Flang%3Den&X-Plex-Token=**** (async=True timeout=10.0(10))
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux] How to force Plex to transcode instead of direct play0