So I have had a lot of success using a Raspberry Pi 3 as a PMS, and have all my videos in HEVC which is compatible with all my devices. They are also with AAC audio, and while with my Roku-embedded Smart TV (with Plex client) can play them, the server chooses to transcode to AC3. But, that’s not my problem as the RP3 seems to transcode that fine in real-time while streaming HEVC. My problem revolves around containers.
My videos are stored in MKV, and while most work fine, I have a few videos with a high bitrate video stream (at least 5000Kbps), and for some reason or another, Plex forces a transcode from HEVC to h264 instead of direct streaming. If I force the client to request Direct Play, then it’ll stream with no transcoding just fine. That would be ok except when doing that, it disables subtitles. What I found is if I converted the container to MP4 while keeping all contents exactly the same (used XMedia Recode), Plex handles the video streams just fine with no transcoding beyond AAC -> AC3.
While MP4 seems more “compatible”, I honestly prefer to keep my files as MKV. Other than what I tried, is there anything else I could do to get the best of both worlds for these high bitrate videos (in that I can keep my MKVs yet not require forced Direct Play so I can see subtitles)?
So, in summary, your scenario is: hevc, aac, subtitle enabled and you want the Roku client to Direct Play those videos. Please tell us more about your subtitle format. Most likely the format of the subs in those videos is image based (e.g. vobsub) and requires transcoding.
Please take a look at the Plex Media Server.log file and search for MDE (Media Decision Engine) entries. They will tell you why PMS transcodes the video.
Sorry that I hadn’t gotten back immediately. This week has been really busy for me.
Anyways, I gave it a check with a video I knew would run into this issue, and searching for MDE in the log, this sequence of messages was shown (starting just before the first instance of MDE related to the video)…
We’re going to try to auto-select an audio stream for account 1.
Selecting best audio stream for part ID 1476 (autoselect: 0 language: en)
Audio Stream: 4575, Subtitle Stream: -1
MDE: Selected protocol http; container: mkv
MDE: analyzing media item 1468
MDE: Saving Private Ryan (1998): Direct Play is disabled
MDE: Saving Private Ryan (1998): no direct play video profile exists for http/mkv/hevc
MDE: Saving Private Ryan (1998): no direct play video profile exists for http/mkv/hevc/aac
Saving Private Ryan - audio.channels limitation applies: 6 > 2
Saving Private Ryan - audio.channels limitation applies: 6 > 2
Saving Private Ryan - audio.channels limitation applies: 6 > 2
MDE: Cannot direct stream audio stream due to profile or setting limitations
MDE: Saving Private Ryan (1998): selected media 0 / 1468
Streaming Resource: Calculated bandwidth of 13647kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 12000kbps
Streaming Resource: Determining preferred transcode encoders through transcode only decision.
Scaled up video bitrate to 29209Kbps based on 4.500000x fudge factor.
Scaled up video bitrate to 29209Kbps based on 4.500000x fudge factor.
Streaming Resource: Reducing playback quality for 11428kbps stream bitrate: video resolution to 1920x1040, audio channels to 6, quality to 35, disable video DS as 21306kbps is > the 10932kbps available
Scaled up video bitrate to 29209Kbps based on 4.500000x fudge factor.
MDE: Selected protocol http; container: mkv
MDE: analyzing media item 1468
MDE: Saving Private Ryan (1998): Direct Play is disabled
MDE: Saving Private Ryan (1998): no direct play video profile exists for http/mkv/hevc
MDE: Saving Private Ryan (1998): no direct play video profile exists for http/mkv/hevc/aac
Saving Private Ryan - audio.channels limitation applies: 6 > 2
MDE: Saving Private Ryan (1998): Direct Streaming is disabled, so video stream will be transcoded
MDE: Saving Private Ryan (1998): no remuxable profile found, so video stream will be transcoded
MDE: Cannot direct stream video stream due to profile or setting limitations
Scaled up video bitrate to 29209Kbps based on 4.500000x fudge factor.
Saving Private Ryan - audio.channels limitation applies: 6 > 2
Saving Private Ryan - audio.channels limitation applies: 6 > 2
MDE: Cannot direct stream audio stream due to profile or setting limitations
MDE: Saving Private Ryan (1998): selected media 0 / 1468
So if I understand correctly, the reason why it’s forcing a transcode is because the calculated bandwidth needed for the video is greater than the limit that was set in place. But, how does it determine what the bandwidth limit is? Why only 12Mbps? I have my RPi3 wired to the router (because its WiFi is crap), but my TCL TV w/ Roku is connected via 5.0Ghz WiFi, and the router is right next to the TV. I don’t have that wired because it prevents me from using the Roku app on my smartphone. As I mentioned before, if I select Force for Direct Play on the Plex client, the video plays just fine (but without subtitles).
Well, I think I may have found the solution with finding out that 12Mbps limit. I went into the Roku Plex app on my TV under Settings > Video > Local Quality, and found it to be set at “12Mbps 1080p”. I increased it to “20Mbps 1080p”, and now the video that had a problem without forcing Direct Play is now playing (with transcoding only the audio to AC3 since my setup is 2ch stereo and not 6.1 surround that the video has). As mentioned before, the RPi3 seems fast enough to transcode that in real time, so I have no problem with that. I notice that under that same setting that there is an option for “Original”, but it is noted as not recommended. Now, that option is also listed for Remote Quality and Online Quality, so it may just be a means of keeping that list uniform for all 3 settings. So, for Local Quality, should I select that maximum option?