Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

How to debug why Plex choses to transcode certain media

DjelibeybiDjelibeybi Members, Plex Pass Posts: 41 Plex Pass

Hi everyone,

I have a situation where either my Plex Server or the Plex Client on my Samsung TV (UA55JS8000, App v2.006) decides to transcode instead of using Direct Play.

However, if I stop the playback and switch to Direct Play, the media plays just fine (video and audio), so obviously both the client and network can handle the media untranscoded.

I've set local quality in the Plex Client to 12 and enabled "Always use Highest Resolution" and "Always use First Part" in the advanced settings.

Can someone point me towards which logs I should be checking to try and determine why the decision is made to transcode over direct play?

Thanks!

Best Answer

Answers

  • DjelibeybiDjelibeybi Members, Plex Pass Posts: 41 Plex Pass

    Thanks Orca. Will give this a whirl and see how it goes.

    I also have to work out why my TV hasn't upgraded to 2.007 yet.

  • OttoKernerOttoKerner Members, Plex Pass, Plex Ninja Posts: 23,417 Plex Ninja
    edited February 22

    When looking at the Plex Media Server.log files, seek for lines containing MDE:. These will have the most interesting info.

    Tip: do not activate 'verbose' logging. It will only spam your files without adding significant detail.

    Help others too - by reporting back with your results!
    Have you checked the Documentation before posting a question in the forums?
    Use the SEARCH function before starting a new thread!
    No PMs unless requested, please! Do not use 'verbose' logging
  • julioluizjulioluiz Members Posts: 26 ✭✭

    I was about to create a new thread and ask the very same thing, then I saw this.

    The only things that I've seen so far that requires the TV (UN40J6400) to use "Direct Stream" mode are 10-bit x265 encodes and FLAC audio tracks.

    Today I tried to play a regular x264 file (see the media info from Plex itself), apparently similar to many of my other encodes and for some reason, "auto" mode kept using transcoding. When I tried manually setting Direct Play, I saw a message saying that the file might be corrupted or there's no support for the media format.

    The first thing that came to my mind was checking the log files. But still I can't seem to find any specific information on the matter of why is it using transcoding for this file.

    Media info from Plex

    Media
    Video Resolution 1080p
    Duration 1:56:58
    Bitrate 10645 kbps
    Width 1920
    Height 800
    Aspect Ratio 2.35
    Container MKV
    Video Frame Rate 24p
    Audio Profile dts
    Video Profile high

    Part
    Duration 1:56:58
    File FILENAME.mkv
    Size 8.70 GB
    Audio Profile dts
    Container MKV
    Video Profile high
    Codec H264
    Bitrate 9109 kbps
    Language English
    Bit Depth 8
    Chroma Subsampling 4:2:0
    Frame Rate 23.976 fps
    Height 800
    Level 5.1
    Profile high
    Ref Frames 10
    Scan Type progressive
    Width 1920
    Codec DCA
    Channels 5.1
    Bitrate 1536 kbps
    Language English
    Audio Channel Layout 5.1(side)
    Profile dts
    Sampling Rate 48000 Hz
    Codec ASS
    Language English
    Codec SRT
    Language English
    Format SRT
    Codec SRT
    Language Português
    Format SRT

  • OttoKernerOttoKerner Members, Plex Pass, Plex Ninja Posts: 23,417 Plex Ninja
    edited February 27

    This file uses the H.264 Level 5.1 with 10 reference frames.
    This is most likely what is triggering the transcode, because many many hardware decoders out there cannot go beyond Level 4.1 and 5 reference frames at most.

    Besides, ASS subtitles will also trigger transcoding, because its advanced text stylings are never supported by embedded players.

    Help others too - by reporting back with your results!
    Have you checked the Documentation before posting a question in the forums?
    Use the SEARCH function before starting a new thread!
    No PMs unless requested, please! Do not use 'verbose' logging
  • julioluizjulioluiz Members Posts: 26 ✭✭
    edited February 28

    Oh man, thanks a lot for your fast and complete reply!

    And yes, that's what I suspected to be the one to blame: ref frames.

    On the subtitle matter, yes, that's something else that makes Plex use Direct Streaming. Because of that I always make sure to provide and external .srt english file, even if the video file itself has an ASS muxed in the container. As I am an student of the english language I often keep switching between PT-BR and ENG subtitles to check new words for my vocabulary. And that's only possible if I choose a .srt subtitle file at the episode/film page. ASS files will be exhibited throughout the whole video, without switching or disabling. Thanks also for providing the reason ( because its advanced text stylings are never supported by embedded players) this happens.

    Can you teach me how to find out about this in the log file, so I won't have to keep comparising media infos to see what's the difference (and the transcode trigger)?

    Once again, your help is much appreciated!

  • OttoKernerOttoKerner Members, Plex Pass, Plex Ninja Posts: 23,417 Plex Ninja

    @julioluiz said:
    Can you teach me how to find out about this in the log file, so I won't have to keep comparising media infos to see what's the difference (and the transcode trigger)?

    I mentioned it already above:
    https://forums.plex.tv/discussion/comment/1377655/#Comment_1377655

    Help others too - by reporting back with your results!
    Have you checked the Documentation before posting a question in the forums?
    Use the SEARCH function before starting a new thread!
    No PMs unless requested, please! Do not use 'verbose' logging
  • OrcaOrca Plex for Samsung Developer Members, Plex Pass, Plex Ninja Posts: 7,263 Plex Ninja

    FYI : since version 2.007 ASS and SSA subtitles are also supported in overlay mode, which means the app can render them without the help of the transcoder .
    Also, the app has it's own MDE (Media Decision Engine), so the real decision on why it starts transcoding can be found by activating the Send debug to PMS option and then checking the Plex media server.log file

    Have you checked if your answer might be in the User Manual?
    My Samsung environment:

    2010 BD-C5500 Blu-Ray,
    2011 UE46D7000 LED-TV,

    2012 BD-ES6000 Blu-Ray,

    2014 UE55HU8500L UHD LED TV

    If you enjoy this free app, you can buy me a beer by making a Donation

  • julioluizjulioluiz Members Posts: 26 ✭✭

    @OttoKerner said:

    @julioluiz said:
    Can you teach me how to find out about this in the log file, so I won't have to keep comparising media infos to see what's the difference (and the transcode trigger)?

    I mentioned it already above:
    https://forums.plex.tv/discussion/comment/1377655/#Comment_1377655

    Oh blimey! I am sorry. When I had first glanced through the log I couldn't locate the MDE: elements, but then I used the search shortcut (ctrl + F) and distinguished it clearly. Many thanks, dear forum mate!

    @Orca said:
    FYI : since version 2.007 ASS and SSA subtitles are also supported in overlay mode, which means the app can render them without the help of the transcoder .
    Also, the app has it's own MDE (Media Decision Engine), so the real decision on why it starts transcoding can be found by activating the Send debug to PMS option and then checking the Plex media server.log file

    That's some news I am glad to hear! Thanks for the improvements Orca, you should know how much we appreciate all the effort you put into this app.

    Thank all you guys for your assistance!

  • FernandoMiguel3FernandoMiguel3 Members, Plex Pass Posts: 118 Plex Pass
    edited April 18

    i'm having all my media transcoded too.
    was ok till a few releases ago.
    I suspected it was the EAC3 codec, but AFAIK that is now fixed.

    From the logs

    Apr 18, 2017 14:36:56.573 [0x7f58d07ff700] DEBUG - MDE: Knows Best: Direct Play is disabled
    Apr 18, 2017 14:36:56.573 [0x7f58d07ff700] DEBUG - MDE: Knows Best: media must be transcoded in order to use the hls protocol
    Apr 18, 2017 14:36:56.573 [0x7f58d07ff700] DEBUG - MDE: Knows Best: Direct Streaming is disabled, so video stream will be transcoded
    Apr 18, 2017 14:36:56.573 [0x7f58d07ff700] DEBUG - MDE: Knows Best: no remuxable profile found, so video stream will be transcoded
    Apr 18, 2017 14:36:56.573 [0x7f58d07ff700] DEBUG - MDE: computed resolution bounding box of 1912x1072.
    

    codec xml

    <Media videoResolution="1080" id="11393" duration="2527104" bitrate="5619" width="1912" height="1072" aspectRatio="1.78" audioChannels="6" audioCodec="ac3" videoCodec="h264" container="mkv" videoFrameRate="24p" videoProfile="high">
    <Part accessible="1" exists="1" id="18736" key="/library/parts/18736/1491958800/file.mkv" duration="2527104" file="/data/XXXX.1080p.WEB.DL.h264.mkv" size="1775125270" container="mkv" hasThumbnail="1" indexes="sd" videoProfile="high">
    <Stream id="59008" streamType="1" default="1" codec="h264" index="0" bitrate="5235" language="English" languageCode="eng" bitDepth="8" chromaSubsampling="4:2:0" colorRange="tv" colorSpace="bt709" frameRate="23.976" hasScalingMatrix="0" height="1072" level="40" profile="high" refFrames="4" scanType="progressive" title="XXXX.1080p.WEB-DL.DD5.1.H264-RARBG" width="1912"/>
    <Stream id="59009" streamType="2" selected="1" default="1" codec="ac3" index="1" channels="6" bitrate="384" language="English" languageCode="eng" audioChannelLayout="5.1(side)" samplingRate="48000" title="XXXX.1080p.WEB-DL.DD5.1.H264-RARBG"/>
    <Stream id="59010" streamType="3" selected="1" default="1" codec="srt" index="2" language="English" languageCode="eng"/>
    <Stream id="59011" streamType="3" codec="srt" index="3" language="English" languageCode="eng" title="SDH"/>
    <Stream id="59013" key="/library/streams/59013" streamType="3" codec="srt" format="srt"/>
    </Part>
    </Media>
    

    PMS v1.5.5.3634
    TV UE48JU7000 v2.008

    thanks guys

    Samsung UE48JU7000 J series 2015

  • FernandoMiguel3FernandoMiguel3 Members, Plex Pass Posts: 118 Plex Pass

    @Orca can you help out here? ^^^^

    thanks

    Samsung UE48JU7000 J series 2015

  • OrcaOrca Plex for Samsung Developer Members, Plex Pass, Plex Ninja Posts: 7,263 Plex Ninja
    edited April 23

    Is your server remote? If so there is a bug in 2.008 that may cause it to do Direct streaming

    Have you checked if your answer might be in the User Manual?
    My Samsung environment:

    2010 BD-C5500 Blu-Ray,
    2011 UE46D7000 LED-TV,

    2012 BD-ES6000 Blu-Ray,

    2014 UE55HU8500L UHD LED TV

    If you enjoy this free app, you can buy me a beer by making a Donation

  • FernandoMiguel3FernandoMiguel3 Members, Plex Pass Posts: 118 Plex Pass

    @Orca said:
    Is your server remote? If so there is a bug in 2.008 that may cause it to do Direct streaming

    yes, it is remote @Orca .
    video will always be transcoded, audio is mixed between transcode or stream.

    any idea when that might be fixed? I know how long it takes for samsung to approve new packages :(
    been terrible few weeks.
    all video is transcoded, taking much longer to start or FF.
    subtitles get all messed up and dont always allow to change or disable.

    thanks for the quick reply.

    Samsung UE48JU7000 J series 2015

  • faz17faz17 Members Posts: 17 Plex Pass

    @Orca not for put you under pressure but just for an idea ... Do you have an ETA for the new version release that fix this problem? There's something we can do in meantime? Thanks

  • julioluizjulioluiz Members Posts: 26 ✭✭

    Hey guys, back here :#

    Got a new problem, tried looking things up on logs searching for the MDE lines but honestly couldn't get much out of it this time.

    The episode plays for a while (let's say 30 seconds maximum) and then a "network error" message pops up and it gets back to episode page.

    The log information, here it is:

    May 07, 2017 02:33:27.904 [4504] DEBUG - MDE: received PLEX_PROTOCOL_ANY from client, but could not determine best protocol. Defaulting to HTTP May 07, 2017 02:33:27.904 [4504] DEBUG - MDE: analyzing media item 1274 May 07, 2017 02:33:27.904 [4504] DEBUG - MDE: E1 - EPISODENAME: Direct Playing due to no transcode profile May 07, 2017 02:33:27.904 [4504] DEBUG - MDE: E1 - EPISODENAME: no direct play video profile exists for http/mp4/h264 May 07, 2017 02:33:27.904 [4504] DEBUG - MDE: E1 - EPISODENAME: no direct play video profile exists for http/mp4/h264/aac May 07, 2017 02:33:27.904 [4504] DEBUG - MDE: SERIESNAME - S1 E1 - EPISODENAME: selected media 0 / 1274 May 07, 2017 02:33:27.904 [4504] DEBUG - Streaming Resource: Added session 059BEA58:token=xxxxxxxxxxxxxxxxxxxx May 07, 2017 02:33:27.904 [4504] DEBUG - Streaming Resource: Reached Decision id=992 codes=(MDE=1000,Direct play OK.) media=(id=1274 part=(id=1665 decision=direct play protocol=* streams=(Video=(id=6290 decision= width=0 height=0) Audio=(id=6291 decision= channels=0 rate=0) Subtitle=(id=7185 decision=unavailable languageCode=por location=sidecar)))) May 07, 2017 02:33:27.904 [4504] DEBUG - Content-Length of D:\Vídeos\Séries\SERIESNAME\FILENAME.mp4 is 1328072612.

    I know it has nothing to do with transcoding decision, but still some help would be really appreciated.

    Thanks in advance!

  • OrcaOrca Plex for Samsung Developer Members, Plex Pass, Plex Ninja Posts: 7,263 Plex Ninja

    Have you checked if your answer might be in the User Manual?
    My Samsung environment:

    2010 BD-C5500 Blu-Ray,
    2011 UE46D7000 LED-TV,

    2012 BD-ES6000 Blu-Ray,

    2014 UE55HU8500L UHD LED TV

    If you enjoy this free app, you can buy me a beer by making a Donation

Sign In or Register to comment.