Unfortunately I cannot convince some people in my family to use direct play, they constantly are transcoding to save 1 Mbps in some cases, but I digress. I am using Plex Docker on an ubuntu install. This Ubuntu machine is a VM on Proxmox. The issue I have is, I have enabled HW Transcoding and pass thru a simple quadro p400. When this is enabled I can get about 3 streams before it starts causing issues. my CPU though never goes over a few % use while this happens. For instance, right now, I have 3 HW transcoding streams and 1 direct play, and my cpu % is at 2.7%, but no one else can stream and the 4th one if they try to transcode just fails. Shouldnt the CPU do the transcoding if the GPU is over loaded? Do I need to change a setting or something?
Is one account trying to do multiple transcodes or each user has their own user?
Ideally you should share the debug logs of that moment so they can try to help you
they have their own accounts. I’m looking through the logs, but I cant find anything in there that really shows me someone was having a problem. I’m wondering if I change the transcoder setting from Automatic to Make my CPU hurt if that will use more of my CPU. I have set it up for 2 sockets 8 cores for a total of 16 threads, so I should be able to squeeze out a few more I would think. I did notice my Ram was maxing out a bit, so I’m going to add some more to it tonight. This is really the first time its been a problem, normally I have 1 or 2 simultaneous streams, hardly ever any more, just happened to hit 4 tonight.
I don’t really have an answer for why additional streams aren’t going to the CPU, but I do know that the Quadro p400 is limited to 3 simultaneous NVENC sessions.
that’s good to know, because I was curious about it doing more. I was feeling a little crazy that I was able to do 3 or 4 streams on an i3.3220, and still only 3 streams with p400. It definitely seems like its a giant help with the CPU though! I just tried turning off hw transcoding, and I was able to get 7 streams with direct play going and nothing happening on the cpu.
“20 0 3664484 287368 42000 S 4.3 1.4 1:39.58 Plex Media Serv” 4.3%CPU. However, I cant seem to go over 7, it just starts stalling, not that I would ever need more than 4. If I change the quality to transcoding value, I do three transcodes:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
It certainly ramps up but I can get up to 6 transcodes but that’s not what happens when I have HW transcoding enabled, with it enabled I can get 1 direct play and 3 transcodes before it stops really working.
So I just disabled HW Transcoding, and tried recreating the scenario last night through my browser, which I understand is not apples to apples. I played the same 3 videos that were transcoding and the direct play that tried to happen, and they all played fine. When changing that 4th to transcode it definitely starts hitting the CPU hard, but they all play. Maybe I should just disable the Hardware transcoding.
The only thing that jumps out is TranscodeCountLimit=3:
May 27, 2021 22:16:15.377 [0x7f8872ffd700] DEBUG - [Now] Adding 4 sessions.
May 27, 2021 22:16:15.380 [0x7f890a8b5700] DEBUG - Completed: [172.18.0.4:54254] 200 GET /status/sessions (26 live) GZIP 2ms 7586 bytes (pipelined: 1)
May 27, 2021 22:16:15.534 [0x7f88717fa700] DEBUG - Request: [127.0.0.1:42674 (Loopback)] PUT /video/:/transcode/session/F401F2DA-74E9-4456-AD1A-A83F79ADCBD0/81e9870f-3e5f-4a35-8714-a624ed17f68a/progress?progress=65.6&size=-22&remaining=-1&vdec_packets=34660&vdec_hw_ok=34643&vdec_hw_status=1 (25 live) Signed-in Token (ejkeebler) (range: bytes=0-)
May 27, 2021 22:16:15.534 [0x7f890a8b5700] DEBUG - Completed: [127.0.0.1:42674] 206 PUT /video/:/transcode/session/F401F2DA-74E9-4456-AD1A-A83F79ADCBD0/81e9870f-3e5f-4a35-8714-a624ed17f68a/progress?progress=65.6&size=-22&remaining=-1&vdec_packets=34660&vdec_hw_ok=34643&vdec_hw_status=1 (25 live) 0ms 371 bytes (pipelined: 1777) (range: bytes=0-)
May 27, 2021 22:16:16.036 [0x7f88f0ff9700] DEBUG - Request: [127.0.0.1:42674 (Loopback)] PUT /video/:/transcode/session/F401F2DA-74E9-4456-AD1A-A83F79ADCBD0/81e9870f-3e5f-4a35-8714-a624ed17f68a/progress?progress=65.6&size=-22&remaining=19646&vdec_packets=34661&vdec_hw_ok=34644&vdec_hw_status=1 (25 live) Signed-in Token (ejkeebler) (range: bytes=0-)
May 27, 2021 22:16:16.036 [0x7f890a8b5700] DEBUG - Completed: [127.0.0.1:42674] 206 PUT /video/:/transcode/session/F401F2DA-74E9-4456-AD1A-A83F79ADCBD0/81e9870f-3e5f-4a35-8714-a624ed17f68a/progress?progress=65.6&size=-22&remaining=19646&vdec_packets=34661&vdec_hw_ok=34644&vdec_hw_status=1 (25 live) 0ms 371 bytes (pipelined: 1778) (range: bytes=0-)
May 27, 2021 22:16:16.109 [0x7f8872ffd700] DEBUG - Request: [192.168.23.114:63902 (Subnet)] OPTIONS /:/prefs?TranscodeCountLimit=3 (25 live) GZIP Signed-in Token ()
May 27, 2021 22:16:16.109 [0x7f890a0b4700] DEBUG - Completed: [192.168.23.114:63902] 200 OPTIONS /:/prefs?TranscodeCountLimit=3 (25 live) GZIP 0ms 376 bytes (pipelined: 68)
May 27, 2021 22:16:16.114 [0x7f890a8b5700] DEBUG - Auth: authenticated user 1 as ejkeebler
May 27, 2021 22:16:16.114 [0x7f88727fc700] DEBUG - Request: [192.168.23.114:63902 (Subnet)] PUT /:/prefs?TranscodeCountLimit=3 (25 live) GZIP Signed-in Token (ejkeebler)
May 27, 2021 22:16:16.116 [0x7f890a0b4700] DEBUG - Completed: [192.168.23.114:63902] 200 PUT /:/prefs?TranscodeCountLimit=3 (25 live) GZIP 2ms 320 bytes (pipelined: 69)
May 27, 2021 22:16:16.545 [0x7f88717fa700] DEBUG - Request: [127.0.0.1:42674 (Loopback)] PUT /video/:/transcode/session/F401F2DA-74E9-4456-AD1A-A83F79ADCBD0/81e9870f-3e5f-4a35-8714-a624ed17f68a/progress?progress=65.6&size=-22&remaining=16186&vdec_packets=34662&vdec_hw_ok=34645&vdec_hw_status=1 (22 live) Signed-in Token (ejkeebler) (range: bytes=0-)
May 27, 2021 22:16:16.546 [0x7f890a0b4700] DEBUG - Completed: [127.0.0.1:42674] 206 PUT /video/:/transcode/session/F401F2DA-74E9-4456-AD1A-A83F79ADCBD0/81e9870f-3e5f-4a35-8714-a624ed17f68a/progress?progress=65.6&size=-22&remaining=16186&vdec_packets=34662&vdec_hw_ok=34645&vdec_hw_status=1 (22 live) 0ms 371 bytes (pipelined: 1779) (range: bytes=0-)
The transcoding logs aren’t very intelligible for non Plex employees, but yeah, I think Plex should fall back to CPU after using the available sessions of a GPU, if technically possible. They do that for subtitles.
Unfortunatelly, your CPU doesn’t support Quick Sync either.
To end transcoding I would do the following: Video codec: x264 (files bigger than x265, but it worth it) Audio codec: Could be other, but AAC is compatible with most players Subtitles: Always SRT
And if a user insists on not changing their Player Remote Quality to Original, you can go even further:
Settings → Transcoder → Disable video stream transcoding, but once enabled they will just get a generic error when trying to transcode, but for sure it will save you a lot of CPU and electricity.
A more elegant solution would be using Tautulli paired with killstream. There you could kill the stream that’s transcoding and send the user a message like “To continue streaming change your remote quality to original”, and you also could create exceptions where Alice is allowed to transcode, but Bob isn’t.