Actually I have Plex installed on my Debian 10 (Openmediavault) DIY NAS but I’m having some playback problems while trying to play 4K HEVC in high bitrates (between 30mbps to 54mbps), when the playback starts, after 10-15 seconds, keeps buffering for 5 secs aprox and then play for another 10-15 seconds and the same, keeps happening…
It seems hardware transcoding is working fine:
Feb 02, 2021 10:47:24.747 [0x7f98b7fff700] DEBUG - [Transcode] Starting a transcode session 9nyfvv7f6m6u2u678j711e2h at offset -1.0 (state=3)
Feb 02, 2021 10:47:24.747 [0x7f98b7fff700] DEBUG - [Transcode] TPU: hardware transcoding: using hardware decode accelerator vaapi
Feb 02, 2021 10:47:24.747 [0x7f98b7fff700] DEBUG - [Transcode] TPU: hardware transcoding: zero-copy support present
Feb 02, 2021 10:47:24.747 [0x7f98b7fff700] DEBUG - [Transcode] TPU: hardware transcoding: not using zero-copy because subtitle burning is required
Feb 02, 2021 10:47:24.747 [0x7f98b7fff700] DEBUG - [Transcode] [Universal] Using local file path instead of URL: Joker.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-JATO/Joker.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-JATO.mkv
Feb 02, 2021 10:47:24.748 [0x7f98b7fff700] DEBUG - [Transcode] Codecs: hardware transcoding: testing API vaapi
After checking CPU performance, with subtitles the processor runs between 40-60% per core without, it drops to around 10% per core, on the GPU side the usage variation is between 14%-27%, checked with intel_gpu_top
This behavior happens not only in the web player but also in my Samsung smart tv with wired LAN connection
Server Version#: 1.21.2.3943 (latest)
Player Version#: 4.51.1 (web in Chrome)
I was thinking to buy an external GPU like a Quadro P400 but I don’t think the GPU is the problem here… May I ask you please some guidance for troubleshooting?
Hi Bruno,
You server is using hardware transcoding and your integrated graphics are NOT meant to handle that. They’re just enough to handle the Desktop and maybe playing back a video, but not for transcoding them. As your CPU itself is rather powerful, try disabling HW transcoding in the settings and try again. If you don’t like your CPU relaxing under pressure at a 100% (or you run out of cores at multiple users), an external card definitely is an option.
Hi @Super4Jet , thanks a lot for the quick answer, I had such feeling about internal adapter but the specs seems to decode HEVC but as you mention, probably is not powerful enough… I’ve tried many times before getting a plex pass and have the chance to activate hardware transcode and the 8 CPU cores are full at 100% the whole time and the buffering is less frequent but I have a Nextcloud instance, Plex, NAS (openmediavault) and Jitsi in the same server and I can’t dedicate the 8 cores at full capacity only for Plex unfortunately… so it seems the way to go is to have a dedicated GPU… I’ll search for something like Quadro P400/P600 due to physical size of my case.
Do you guys know if do I have to do or activate something special for such external Nvidia GPU?
Even though the load is much higher while transcoding 4K with burned subtitles (which unfortunately is a must while watching movies and series), it seems it’s not really fully overloaded to the point to buffering every 10-15 seconds (with burned subs only, playback is perfectly fast and smooth without subs).. any hint here how to solve it? or the external GPU here is a must?
The problem here is that I could only lower the resolution to 20 Mbps instead of 40, there was no option to set 1080p 40 Mbps, the curious thing about this test is that the first 15 seconds the GPU peaked to 87% of usage and afterwards it went down to average 37% as shown below:
After reading a bit more about your advice regarding using SRT instead of PGS, I wanted to try testing it with SRT and in this case it’s a little bit better but still buffering, now a bit less often, every 25-30 secs, and the CPU/GPU output is the same as using PGS subs:
That’s what I’m also thinking but I cannot realize where… I have a ubiquiti edgerouter, connected via gigabit LAN to the Plex server, then to a small 4 ports hub and then to the TV by LAN as well… no wifi in the middle
You’re wasting a huge amount of CPU time.
It looks as if it’s scanning everything (FULL SCAN) every time a change is detected.
Settings - Server - Library - SHOW ADVANCED
a. Scan Automatically (ON)
b. Run a partial scan (ON)
Is that hardware a HUB or a SWITCH ? (very important)
a. A hub is as bad as wifi. Only one can talk at a time
b. Every device plugged into a hub will see all the traffic. It should only see traffic for itself.
Second cousin Luigi is certified. Shall I make an appointment?
Are you perhaps getting Software HDR->SDR tone mapping ?? That will chew up the CPU really fast and make things “choppy”.
True… I activated it in purpose to have everything I download right away available but it makes not that much sense in my case where I’m sharing different services in the same server
My bad… is a 4 ports switch… it’s a Unifi Switch Flex Mini, so it’s really a switch, no hub here
Thanks but I would need subtitles for those sessions
That’s something I’ve just read about in the official article HDR to SDR Tone Mapping | Plex Support , as far as I can read, it should not be working under software mapping due to the iGPU is supported for that, I also have the dependencies installed: ocl-icd-libopencl1 beignet-opencl-icd
What I’m not sure how to check is this note from the article:
Note : If the necessary drivers and libraries cannot be detected or are not available, then software-based (CPU-based) tone mapping will be used with hardware-accelerated decoding and encoding (if enabled). This may degrade performance.
If you are frequently going to use subtitles ( very common in Europe with our far flung and extended families ), I recommend using SRT subtitles as much as possible.
SRT subtitles have extra benefits:
VERY little storage space
They are text - No burning required. (If someone is; You know what to do )
SRT , Audio , and Video are all sent in independent streams. it is the lowest “cost to stream”. The server just makes sure the next block is sent when the app needs it. The app does all the work for SRT subtitles.
Interesting!, great to know about subs, thanks a lot!
Do you think that some external GPU like a Nvidia Quadro P400/P600 would help to reduce even more the CPU usage in the server? or do you think I will still have the bottleneck issues?
The load reduction which an external GPU provides is minimal unless the CPU itself doesn’t have enough internal ASIC capability.
The CPU-side processing which can’t be done in a GPU is both Audio & Subtitles.
The CPU-ASIC processing in a modern -8xxx or above CPU is such that you’ll run out of CPU (audio conversion) before you run out of ASIC.
When you have a strong CPU (e.g. AMD Ryzen or Intel Xeon) with no QSV, then the Nvidia provides something you need.
I would first conduct some testing on your end
SRT subtitles
Make certain the players are set to either Automatic or Image-only burning.
Let the player do as much work as it can. (allow DirectStream, etc).
Open up the player and see what it can do. The Nvidia Shield can DirectPlay 2160p HEVC HDR @ 59.94 hz and do all the processing locally within itself. PMS uses about 4-5% of a core when streaming to it.
Hi, thanks for the reply and sorry for my late one!, well, after doing the tests you’ve suggested @ChuckPa , I’ve found out and confirmed that my TV cannot handle the PGS subtitles, only some SRT (not even all SRT’s) and that made my server suffer quite a lot and it seems that it cannot handle such big transcodings like 4k ones with PGS or SRT subs…
I’ve even tried with emby and the transcoding was done properly but that was only possible reducing the bit rate… so it seems emby can deal better with it but it cannot keep the original bitrates…
So I’ve finally decided to buy a Nvidia Shield Pro 2019 and I’m quite surprised with the performance of such small device… it support every single video format I have including PGS and SRT subtitles so 99% of the videos and movies I have are being played by Direct Play which is awesome because my server doesn’t do much lately and it’s more relaxed to deal with the other things I have installed there.
So at the end, my solution was the Nvidia Shield Pro, which I’m happy with it, not only for the Direct Play capabilities but also because I’m enjoying several other features from it.
Thanks a lot Chuck for helping me understand how everything works in Plex!
Bruno, I am glad you got this working. Do you have a source for the the list of supported subtitle formats on the shield / and or can you confirm which ones you have used that didn’t require burning in?
Your post increased my interest in the Shield since I have a lot of old Anime that has different subtitle formats.
I did a search and the most recent thing I am finding is a post asking about support for exactly this reason (avoiding transcoding) and the responses are people misunderstanding and saying it doesn’t matter and it’s handled by the server.
Thanks!, actually I never found ANY information about the subtitle support, everything related to video format and codecs, but nothing related to subtitles… it’s a pity that nvidia don’t care about such specs… they forget about non-english fluent customers like me and many other hundreds of millon latin american customers (and just talking about one non-english region only)
I know what you mean from the forums… there’s no precise information from anybody about it…
To be honest, I didn’t check the whole subtitles around to have a look but so far I could confirm that SRT, PGS and ASS subtitles don’t require burning in… so direct play is used
I just wanted to comment that transcoding audio (TrueHD) along with subtitles (SRT or PGS) usually causes video transcoding as well. And as you found very few players support PGS subtitles.