Advice on reducing transcoding CPU load on Win10 PMS box (various scenarios)?

I don’t have a problem per se, everything is working, I just think it feels like I should be able to get it working better….

If there is some kind of “Transcoding 101” FAQ to direct me to, I’d love that - 15 minutes of forum searching and I couldn’t find something in one place that answered these questions, please excuse me if this is inappropriate.

I have a Windows 10 based PMS running on a Dell Optiplex 3020 SFF box, CPU is an Intel i7-4790K Turbo’ed to 4.4 GHz, running on an SSD with a 6TB HDD for the media files.

I had already been using HW transcoding enabled (whatever that meant for my Optiplex), and recently added a Quadro P400 GPU to further assist with the transcoding.

There is usually only 1, very rarely 2 users of the server at a time, have never hit 3, but from many different clients: Roku devices, iPads, iPhones, and Windows laptops and PCs.

Nevertheless, even with just one client, the CPU load on my PMS can spike at times to 90% with just one user, or even a sustained 80%+ while transcoding, resulting in loud fan noise from the server in my bedroom at night (not good).

After over a year of very naive use, followed by a few weeks of reading about transcoding and learning to use the Plex Dashboard, I’ve determined these are the reasons for various different kinds of transcoding in different scenarios - now, how do I best address them?

Which ones are worth re-encoding material for, or adding HW for, or maybe finding/setting configuration elements to improve, versus “you’ll just have to live with it”?

#1: transcoding to 1080P (H264). I ripped a lot of my stuff through MakeMKV/HandBrake was in H.264, with 10-bit colors. I chose that mainly because it “sounded like it would be nice” and tested it with a Windows PC based web app, where I guess the GPU supported it, and it showed no transcoding. Turns out all Rokus and iDevices transcode this to 1080P (H264).

OK, so I think the Quadro P400 should help with that, right? But I still see CPU spikes on my PMS! Though I do see GPU use as well.

How expensive is 10-bit to 8-bit H.264 transcoding, anyway? If the GPU can do it well I’m not spending 100 hours or whatever re-ripping stuff.

In addition, using the PMS “DVR” function with a HD HomeRun unit I just installed, it records in “1080i MPEG2VIDEO” which plays as a direct stream to my TVs through Roku or PC/laptops, but on playback to an iDevice transcodes to 1080P (H264).

OK, I get that the Plex app on those devices don’t support 1080i natively. But the transcoding of just one playback on one device kills the CPU on my PMS, pegging it to 100%, while the GPU is flat at zero. What the heck?

Why would H.264 10-bit to 8-bit color use the GPU but not from 1080i?

I know there is an “Optimize” feature and if I apply that to one of the DVR recorded shows to pre-process it 1080P @ 20 Mbps, it plays back well on my iDevice and was done pretty quickly. Can’t I enable DVR material conversion to 1080P this as an automatic option, as a post-process if not as a streaming as-it-is-recording option?

#2 reason: PGS subtitles (as for Japanese anime). As I understand it, PGS and ASS (vs. SRT) subtitles require video transcoding, as they are graphical overlays and not text.

So… Should the P400 help with that as well? I can’t tell. For movies with PRT subs I find the SRT files that match the timing, but for the many episodes of shows that I have ripped, I can’t be bothered.

Does a GPU hw transcode PGS overlays?

And how expensive is this to add to the video? Like, if I have an H.264 10-bit show with PGS subtitles getting transcoded to 1080P (H264) and also adding PGS subtitles, if I re-ripped it to be H264 but still with PGS subtitles, is that worth doing?

If the PGS overlay is a small hit to the PMS’ CPU but I can offload the 10-bit to H264 transcoding to the GPU, I would just live with that.

#3 reason: Audio transcoding. One TV with a Roku has only stereo built-in speakers, so it’s almost always transcoding 5.1 (DTS or otherwise) down to AC3 stereo, and for some reason, even AC3 stereo tracks on my iDevices transcode to AAC (thanks, Apple).

I have read that the GPU does not help with audio transcoding (of course not). But how expensive is this? What about the occasional need to transcode TRUEHD to DD or DD+ on a Roku?

So I dumped my PMS log file and combed through it while playing back on my Roku to an AVR with DTS support one of the movies I have ripped with H.264 10-bit color, with DTS-HD audio which should and does pass through directly, and no subtitles.

The only thing going on here is the transcoding of 10-bit to 8-bit H.264:

May 24, 2020 18:15:11.357 [13036] DEBUG - Found session GUID of 176388a6-adab-4f9b-a4e3-864f6e911a38-1 in session start.
May 24, 2020 18:15:11.357 [13036] DEBUG - Starting a transcode session 176388a6-adab-4f9b-a4e3-864f6e911a38-1 at offset -1.0 (state=3)
May 24, 2020 18:15:11.360 [13036] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
May 24, 2020 18:15:11.360 [13036] DEBUG - [Universal] Using local file path instead of URL: V:\Movies\Song Of The Sea (2014).mkv
May 24, 2020 18:15:11.360 [13036] DEBUG - TPU: hardware transcoding: zero-copy support not present
May 24, 2020 18:15:11.360 [13036] DEBUG - TPU: hardware transcoding: final decoder: , final encoder: nvenc

The CPU spikes around and the GPU is dead silent on my server box, and does this older thread in this forum give the reason?

I actually don’t know what “10-bit H.264” vs. “10-bit HEVC”. Isn’t HEVC the H.265 “HDR” spec. But it seems the Quadro P400 HW transcoding won’t happen for the specific, most frequent transcoding scenario that I have!

The other one being to transcode 1080i to 1080p for my Apple iDevices, and it appears it isn’t doing that either!

Dont use 10bit H264, there is no hardware decoder for 10bit H264. either reencode everything to 8 bit H264 or you will need buy a much more power CPU like AMD Ryzen 3600 which on mine can handle 8-10 H264 1080p transcodes fine (60-80% CPU).
your CPU is very weak and can barely handle 1-2 transcodes.

“…there is no hardware decoder for 10bit H264”

Well that sucks.

“…your CPU is very weak and can barely handle 1-2 transcodes”

It’s fine for what I need it to do, most of the time… I think? I’d rather not rebuild the entire box, the CPU is the fastest this motherboard will support, and I got the SFF Optiplex specifically for being quiet with a low power draw, as it is in my bedroom and is left on 24/7.

What about burning PGS subtitles, or doing the 1080i -> 1080p transcoding for an iDevice? Are either of those going to leverage the GPU, and are those as hard on the CPU as transcoding 10-bit to 8-bit H264 is? (Which BTW mostly it does just fine, at least if only doing it for one stream)

Then you must encode your content to 8 bit H264, yes it will take time but in the long run you will save yourself alot of transcoding. Why not just mux the subtitles into the mp4/mkv files ?
PGS is not well supported by plex on any device and will most like require transcoding so if you have option use srt files, either muxed into video or placed in same folder.

Point is… if you have everything in plex friendly encodes you will not need buy a new PC.

The goal is always, Direct Play or Direct Stream.

Yes, I’m going to try re-ripping one series to see what H.264 with PGS subtitles is like (not going to bother to HB compress it this time, which is the step that introduced the 10-bit color encoding, I was just playing around with that to see what it was like and accidentally saved it in my custom preset).

I have made the effort of getting English SRT subtitles for movies (once, I even used an OCR-based transliteration of the PGS subtitles into SRT for a Chinese movie that had no SRT subtitles I could find that lined up properly with the audio) and then using MKV Toolnix to patch them into the MKV file in lieu of the PGS subtitles, but to do so for each episode (one file each) for serial shows that have 40 to 100 episodes total is way beyond what I want to spend my time doing.

There is a certain amount of unavoidable transcoding based on the playback device. Often the only non-commentary audio track is a surround sound one (DTS-HD and DTS), and indeed most of my viewing is done via a Roku through an AVR that can play that, but any playback to an iDevice or the TV with a Roku with only built-in speakers ends up transcoding the audio down.

I trust that my i7-4790K @ 4.0 GHz CPU can keep up with just that?

If the client(s) support it for Direct Play. each device is different with codec and performance.
but why not install SubZero plugin? it will automatically fetch srt subs for your library in what ever languages you choose. its the only plugin i use but so essential for me.

try re-ripping one series and test with PGS sub on vs off. and see if it Direct Plays or Direct Streams.

SubZero? Is that a plug-in for the server instead of the client? Sounds interesting, let’s see what it finds, thanks for the suggestion! Can you use it to make what it does find the default? The “track number” for the PGS subs from the original rip will be lower numbered and thus selected by default or visible first on a drop-down list in the playback app, right?

Just as an example, I’ve been using OpenSubtitles.org to find .SRT files to patch into MKVs (and also to remove the PGS versions, which are usually the default subs that a naive user like one of my kids would probably select, not knowing the difference).

If I look there for subs for “Mob Psycho 100 (2016)”, season 1 of a serial show, there is an .ASS file for Episode 1 and nothing for any other episode, and I believe .ASS is also something that needs transcoding with Plex.

Yes its plug-in for PMS, It runs with server and every time you refresh library it looks for subtitles and you can choose language and up to 3 different languages if you wish. If PGS is prioritized over srt in playback i dont know but you should alway have: Subtitle mode “Manually selected”
many options in the plugin you can tinker with so try it out.

place the sub-zero.bundle folder in “%LOCALAPPDATA%\Plex Media Server\Plug-ins”

So, before I look for SubZero and its support for the serial anime stuff I have, I re-ripped “Mob Psycho 100 S1” (which is H264) which was pretty quick if I skipped HB.

If I play back the video on my Roku with no subs with the default TrueHD English audio track, I see my CPU fluctuating between 15-40% CPU (mostly around 20%) transcoding the audio down since the Roku doesn’t support TrueHD. (No transcoding on my PC or laptop.)

If I play it back with Japanese audio in 2.0 stereo and English PGS, I see no audio transcoding, but there is video transcoding to overlay the PGS subtitles… But, it is indicated as (hw) transcoding and my CPU stays around 10% or less (occasionally hitting 15%). So it looks like my GPU helps with PGS subtitling, if nothing else.

Actually I have a new problem after re-ripping “Mob Pyscho 100 S1” in H264: Roku playback initially works, but after about 30 seconds, dies with a buffering problem even though the Dashboard shows no network or CPU activity.

This didn’t happen when it used to transcode from 10-bit to 8-bit, ironically, and another show that is still 10-bit, plays fine (albeit with about 20-40% CPU load on my server to do that transcoding). I hadn’t even Handbraked it down, it’s the raw MKV at H264 as ripped from the blu-ray disc.

I’m going to try re-ripping an episode of that show without deleting the former 10-bit encoded version as I did here.

I looked at the log file but nothing stands out. Then again I don’t know what I’m looking for?

Any ideas?

Um, maybe I’m just belaboring the obvious, but maybe the buffering problem is caused by my not having Handbraked down the MKV from the original 23+ Mbps 1080P bitrate to 9.x Mbps.

I have always been HB’ing my material, so now that I tried processing them as H.264 without 10-bit color it seems to play fine.

I guess I’m surprised at the buffering problem causing a complete freeze and timeout, plus my Roku wifi network speed tests show 40 Mbps and up… I guess the native bitrate needs buffering and thus a network speed about double that to work properly?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.