I’m running the latest server and client on an Ubuntu 16.04 LTS. I built the client from source following the instructions in the README, but the performance is not great.
Interestingly enough this server works fine with any MacOS or Windows client, including laptops on my local wifi.
Possibly try this one as a point of comparison to see if you experience the same problem. I use the AppImage version on Mint and haven’t observed stuttering.
I suspect you may have also already tried these, but here are a few random troubleshooting thoughts that might help confirm it is the PMP vs something specific with rendering video on that hardware. Perhaps something will pop:
Do you get the same behavior using the player in the Plex web client in a web browser on that box?
While a video is playing, check the Plex dashboard to see if it is Direct Play/Direct Stream/Transcoding. Is this the same as when the same video is played from MacOS or Win?
Do you have the same problem if you play the media directly in another player on the server? (VLC?)
Is it specific to a specific encoding/container type, or all files? Perhaps only mpeg2 in a .ts container, only h.264 in .mp4? Only live TV, or recordings?
What is the server “doing” (CPU use, etc) while playing - system monitor, top, htop, etc. I doubt it, but with the server and client on the same box is it maxing out something while playing?
I saw somewhat similarly bad behavior. Of course, the usage profile will be dominated by the browser in this case.
I am ensuring that I’m playing the original stream, so no transcoding is happening.
No, I play media directly using Kodi (mostly) decoding high bit-rate files of various types including transcoding audio formats newer than AC-3 (since my preamp is limited to that), and things work OK. The load does go up frequently, but the video is responsive.
I’m mostly testing the Live TV & DVR functionality, so I’m not sure (yet). I’m interested in replacing a dead TiVo.
FYI, here’s what the machine was doing part of the time:
top - 15:45:34 up 19 days, 18:28, 4 users, load average: 1.16, 0.44, 0.41
Tasks: 240 total, 3 running, 183 sleeping, 0 stopped, 1 zombie
%Cpu(s): 31.4 us, 4.7 sy, 0.0 ni, 63.6 id, 0.2 wa, 0.0 hi, 0.2 si, 0.0 st
KiB Mem : 8086232 total, 942052 free, 3756640 used, 3387540 buff/cache
KiB Swap: 8304636 total, 8304636 free, 0 used. 3775968 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24155 clint 20 0 2183692 222428 48752 R 59.1 2.8 333:31.44 cinnamon
9120 clint 20 0 3678348 511512 115472 S 53.8 6.3 0:46.72 plexmediaplayer
9233 clint 20 0 1263500 187700 84360 R 19.6 2.3 0:29.49 QtWebEngineProc
1547 root 20 0 393196 88048 74824 S 3.3 1.1 283:12.26 Xorg
22123 clint 20 0 58604 13244 3544 S 2.0 0.2 127:32.33 mosh-server
4978 plex 20 0 3091072 1.208g 24652 S 1.7 15.7 32:55.21 Plex Media Serv
So as you can see, the load is not astronomical, but the result is lackluster.
I didn’t see the load go up too badly recording two late night talk shows directly to a NAS via NFS.
Incidentally, while the video playback works OK on a 2015 Macbook Pro w/16G RAM, I see the client place an unreasonable strain on it when it starts up. The fan kicks on and everything even when it’s not playing any media. What in the heck is it doing?
So, if I had to place any blame, I’d say the client is somehow very inefficient.
Your cinnamon process CPU usage looks high to me, which is interesting because that is your desktop/UI process. Is it high all the time, or only when running PMP? My cinnamon process doesn’t run anywhere near 60% - more like 6% while PMP is playing something. A couple things to try:
Reboot and see if the high cinnamon CPU and the problem persists. Alternately do a “cinnamon --replace” from the command line to replace the cinnamon process (but I’ve have some problems with replace)
When logging into your computer, click on the icon next to your login name. Is “Cinnamon (Default)” selected, or “Cinnamon (Software Rendering)”? If software rendering is selected, then that may be the problem. I’m guessing this is the same for Cinnamon on Ubuntu as I see on Mint.
I can’t speak to MacOS, but I see a short bump in CPU usage when starting PMP, another when I select the live TV guide, but then it drops to very low until I start playing something. While playing CPU usage stays level at ~20-25%.
This is PMP on Mint also on an i5 laptop. I don’t run PMS on this box, but if you are direct play or direct stream the PMS usage should be low, which we are seeing in your screen snapshot - PMS is using 1.7% CPU. I wouldn’t expect recording to create much demand from PMS. Once it makes the API call to the tuner, while recording it is pretty much just redirecting the data stream to your disk.
OK, I have seen that software rendering warning, but that was back when I was trying to get Xorg configured correctly. I couldn’t tell which desktop env was selected, but I did explicitly select Cinnamon, and this is what things look like now:
top - 08:27:32 up 1 day, 13:48, 4 users, load average: 2.12, 1.12, 0.51
Tasks: 218 total, 1 running, 167 sleeping, 0 stopped, 0 zombie
%Cpu(s): 19.2 us, 4.2 sy, 0.0 ni, 76.2 id, 0.5 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8086232 total, 131500 free, 2222344 used, 5732388 buff/cache
KiB Swap: 8304636 total, 8304636 free, 0 used. 5354488 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17017 clint 20 0 3701640 510612 115072 S 57.8 6.3 2:20.44 plexmediaplayer
17135 clint 20 0 1255444 188868 81340 S 19.6 2.3 0:52.33 QtWebEngineProc
15600 clint 20 0 1709924 111380 51928 S 4.7 1.4 0:15.98 cinnamon
13427 root 20 0 364980 55620 46128 S 3.3 0.7 0:17.12 Xorg
5855 clint 20 0 56544 10552 2772 S 1.7 0.1 24:46.41 mosh-server
1188 plex 20 0 2975904 842108 26624 S 0.7 10.4 20:16.19 Plex Media Serv
So, that may have corrected the high Cinnamon process. It was only high when running the media player.
I still see video “jankiness” in playback however.
Grrr…I was really hopeful that would resolve it. Still, it is good to be off software rendering - it gives you more horsepower for other things.
Try playing around with the settings in PMP. Click on the settings icon in the upper right, then click on the “Show Advanced” button. Click “Debug” on the left and try turning off direct play (so it should direct stream). Try turning off both direct play and direct stream to force it to transcode. Under “Quality” on the left, then under “Home Streaming”, turn off “Use Recommended Settings” and try setting the video quality to something less than “Maximum”. You can always set these back if no joy.
I (thankfully) haven’t had this problem, but I do see threads where others do. Some have been able to find a combination of these settings that gets rid of the jerkiness.
Unfortunately, the transcoding options (particularly at 1080) either look bad from compression or worse have motion artifacts. The only one that looked reasonable was 4Mbps 720p. So, transcoding doesn’t look like a decent solution. The direct stream result was better.
FYI, here’s the Mint Forum conversation I was having which had useful info on vainfo and friends. It turns it looks like I do have native MPEG2 support, it’s just that the other library mentioned in there isn’t as up to date.
Before one speaks too much and theorizes what the problem is, more information is needed:
The XML of the item actually being played (Hover over it - expose ellipsis - Get info - View XML - paste surrounded with ``` on the preceding and succeeding lines.
this is how it looks when done
DEBUG (not VERBOSE) mode logs collected by:
a. Verify log settings
b. Start Playback
c. Play for 30 seconds / until stutters
d. Stop Playback
e. Wait 30 seconds for logs to flush
f. Settings - Server - Troubleshooting - Download Logs
g. attach the ZIP file
Thank you for the logs. There is some unformate news
The processor is only a dual core. PMS server machines are much better as quad cores if no Hardware Transcoding is enabled.
What happens when you do try H.264 ? Does it play and transcode correctly?
Your logs show, which I do expect, no HW acceleration for Mpeg2. What I would also expect, which I’m not seeing, is that the hardware was detected albeit not used for MPEG2.
I refer to this block from the logs:
Aug 09, 2019 11:06:07.804 [0x7f78997fa700] ERROR - Unable to find title for item of type 5
Aug 09, 2019 11:06:07.804 [0x7f78997fa700] DEBUG - MDE: analyzing media item -1
Aug 09, 2019 11:06:07.804 [0x7f78997fa700] DEBUG - MDE: : no direct play video profile exists for http/mpegts/
Aug 09, 2019 11:06:07.804 [0x7f78997fa700] DEBUG - MDE: : no direct play video profile exists for http/mpegts//
Aug 09, 2019 11:06:07.805 [0x7f78997fa700] DEBUG - MDE: : codec is unavailable for analysis
Aug 09, 2019 11:06:07.805 [0x7f78997fa700] DEBUG - MDE: : codec is unavailable for analysis
Aug 09, 2019 11:06:07.805 [0x7f78997fa700] ERROR - Unable to find title for item of type 5
Aug 09, 2019 11:06:07.805 [0x7f78997fa700] DEBUG - MDE: : selected media 0 / -1
Aug 09, 2019 11:06:07.805 [0x7f78997fa700] DEBUG - Cleaning directory for session 25a5fbdb-a4a6-49a8-92c6-a0fd14893249 ()
Aug 09, 2019 11:06:07.805 [0x7f78997fa700] DEBUG - Starting a transcode session 25a5fbdb-a4a6-49a8-92c6-a0fd14893249 at offset -1.0 (state=3)
Aug 09, 2019 11:06:07.805 [0x7f78997fa700] DEBUG - Streaming Resource: Added session 0x7f7864615320:25a5fbdb-a4a6-49a8-92c6-a0fd14893249
Aug 09, 2019 11:06:07.806 [0x7f78997fa700] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Aug 09, 2019 11:06:07.806 [0x7f78997fa700] DEBUG - TPU: hardware transcoding: final decoder: , final encoder:
I am surprised at the lack of h/w support. Vainfo seems to indicate it has h/w encode/decode for MPEG2 & H.264. I included that output in a previous post above: Stuttering on playback on Linux client. What library do you use to detect this support? Or is that proprietary?
It will transcode, but the performance is worse, especially for 1080 streams. The result was OK for a 720p stream @4Mbps. Everything else was pretty janky. It does say (h/w) when the transcode is happening.
In the end while I know this is supposed to be an inexpensive PC, I am surprised a Haswell isn’t enough poop to make this all work.
Plex brings everyrthing it needs with it but remember, Plex is the server.
PMP is the player (client).
Are you using the Knapsu PMP client he builds for Linux from the public PMP sources?
also,
please go obtain a directory listing of ls -la /dev/dri and see what we have for owner and group.
Next please see which groups Plex is a member of. I am suspecting a permission problem because PMS will use the ASIC, and send to the player regardless what that player is.
To confirm, ark.intel.com confirms the presence of quick sync video (QSV) which is how Plex’s transcoding works.