Server Version#: 1.13.9.5456
Here’s a screenshot of the PMS logs showing speed and htop in another window.
Server Version#: 1.13.9.5456
Here’s a screenshot of the PMS logs showing speed and htop in another window.
You don’t state what your problem is.
Is the client buffering or something? if so then it sounds like a bandwidth problem.
Plex doesn’t attempt to ‘max’ out the cpu. It only transcodes what is needed with a small buffer ahead of what the client is playing.
It also entirely depends on what is being transcoded, most audio is relatively trivial to transcode, so it won’t do much for cpu usage.
trying to decode or encode bluray or higher can certainly put a strain on things though, depending on how new/powerful the cpu is.
also, with new enough hardware and supported hardware acceleration, the cpu usage may be minimal due to the workload on the GPU.
You simply have not provided enough information and your screenshot and question are irrelevant as presented.
Yes. I’m getting constant buffering. This is all local LAN playback on a wired 1Gbps network. According to the Plex help docs on buffering issues it says it is almost always due to network limitations or CPU limitations. I have neither of those issues. So I’m posting here to figure out why my PMS speed is less than 1 and there is no reason for it to be so low resulting in buffering issues every 30 seconds.
Does PMS use the GPU and not CPU for video transcoding?
speed is 0.9 because the transcoder is split across the cpu’s, and you have 4 of them, so each transcoder tasks only needs .25 to be real time, so at .9 is closer to 3.6
instead of looking at the log for speed, look at the ‘now playing’ status in plex web @ https://app.plex.tv/desktop# > status > now playing
this will tell you what your total transcode speed is, whether or not you are direct play or transcoding, and whether you are transcoding video or audio or both.
Also you should investigate tautulli which can give you even more detailed info on the active streams.
Yes PMS can use the GPU if you have new enough and supported hardware. Otherwise, the CPU will do the transcoding.
In your image, there is a red D on one of the threads, those are being delayed, either by slow IO (ie hard drive) or other processes.
If you have a lot of red D’s in the top list, then you got some problem elsewhere outside of plex.
Wow… good eyes on the red ‘D’. That means a slow disk issue? Blows my mind, this is on an SSD, but I’ll check to see if something is up there. Maybe swap SSDs to see if it changes the behavior at all.
That red ‘D’ is the only thing I can think of causing issues. So I’ll start there unless you have another idea to point me too.
Having some are normal.
Most of the time they are appearing and disappearing quickly.
but if you have a lot of them at the same time and/or they stay on D for extended periods of time, then that is something to investigate.
see also @ https://www.google.com/search?&q=htop+status+d
also, you still have not provided any details on the server itself, and the client that is buffering, what type of content you are attempting to play, and the quality settings of the client.
There are many possible reasons for buffering, you can’t just assume.
Some more questions, is it one particular client or all clients?
local and/or remote clients?
if you want help, you need to provide details and background.
It’s possible you’re on to something. PMS is running in a VM hosted by ESXi on an 8 core, 32GB of RAM host and the files are on a NAS mounted via SMB. There are about 8 VMs running on this SSD datastore. I can try migrating it to a dedicate SSD to see if that changes things. i can also try a separate physical NIC for just the VM to isolate contention on the NIC itself. The only thing that makes me think it isn’t due to virtualization is that there are only two VMs that actually do anything on a regular basis. All of the others barely do anything. I would like to figure out the PMS cause for the buffering because that will point me in the right direction as to where my problem might be.
The other thing is that these are straight BR rips. I would prefer if I could truly force Plex to never transcode but no matter how much I tell it to not trasncode, it seems like it always does. I have always suspected some CODEC limitation on the Roku but don’t know for sure.
have you looked at the roku client settings, check the quality and tell it to use maximum or original or automatic quality, don’t specify a bitrate otherwise PMS will always try to transcode.
how old is the roku, some models are very slow and simply don’t have the power to keep up with full bitrate bluray rips.
have you tried streaming to a PC via plex web @ https://app.plex.tv/desktop
is it only the roku buffering?
how large is your library? small/med/large?
both the plex DB and metadata, and transcoding are all IO heavy, moreso than CPU heavy (obviously depending on the content being transcoded). Latency matters a lot.
Virtualization hides other problems, you should try PMS on bare metal server if you can, to see if that makes a difference.
Otherwise your idea to put plex on a dedicated disk could help, especially if your other VMs are also high IO.
another thing to consider;
if you are streaming straight bluray rips with HD audio, the roku probably does not support decoding the HD audio and this will cause plex to transcode the audio (video may or may not be transcoded).
if your media is on a remote share, the pms is a VM, then the PMS has to pull that full bitrate BR rip across the network, transcode it via the VM disk, then send it back out the network.
that is a lot of work.
Some additional information is needed here.
The most important thing needed is the XML of the video being played. This is because VC-1 is a single-threaded codec. I do not see where the input codec is indicated.
Also, textual logs, in the ZIP file are needed. Screenshots of log fragments are insufficient.
I will get that later today (at work now). I used the screwnshots to show the correlation between the teanscoding speed and CPU utilization since that’s what the Plex help docs said is the typical cause. Now I understand that speed is for a single thread and not overall.
I will post XML and log files later today. Thanks!
Here’s the XML for the video.
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Movies" librarySectionUUID="8c06a928-13ea-4be3-a484-723246a6e1cf" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1541811047">
<Video ratingKey="15823" key="/library/metadata/15823" guid="com.plexapp.agents.imdb://tt5220122?lang=en" librarySectionTitle="Movies" librarySectionID="1" librarySectionKey="/library/sections/1" type="movie" title="Hotel Transylvania 3: Summer Vacation" summary="" duration="5843296" addedAt="1542136676" updatedAt="1542136719" chapterSource="media">
<Media videoResolution="1080" id="17295" duration="5843296" bitrate="29490" width="1920" height="1080" aspectRatio="1.78" audioChannels="6" audioCodec="dca-ma" videoCodec="h264" container="mkv" videoFrameRate="24p" audioProfile="ma" videoProfile="high">
<Part accessible="1" exists="1" id="17555" key="/library/parts/17555/1539370187/file.mkv" duration="5843296" file="/mnt/media/1. High Quality - Default Home Theater - AVI, MP4, and MP3/Video/Movies/H/Hotel Transylvania 3 Summer Vacation (2018)/Hotel Transylvania 3 Summer Vacation (2018).mkv" size="21539938761" audioProfile="ma" container="mkv" videoProfile="high">
<Stream id="35979" streamType="1" codec="h264" index="0" bitrate="25778" language="English" languageCode="eng" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" frameRate="23.976" hasScalingMatrix="0" height="1080" level="41" profile="high" refFrames="2" scanType="progressive" width="1920" displayTitle="1080p (H.264)"/>
<Stream id="35980" streamType="2" selected="1" default="1" codec="dca" index="1" channels="6" bitrate="1536" language="English" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="16" profile="ma" samplingRate="48000" title="Surround 5.1" displayTitle="English (DTS-HD MA 5.1)"/>
<Stream id="35981" streamType="2" codec="dca" index="2" channels="6" bitrate="1536" language="English" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="16" profile="dts" samplingRate="48000" title="Surround 5.1" displayTitle="English (DTS 5.1)"/>
<Stream id="35982" streamType="2" codec="ac3" index="3" channels="6" bitrate="640" language="English" languageCode="eng" audioChannelLayout="5.1(side)" samplingRate="48000" title="Surround 5.1" displayTitle="English (AC3 5.1)"/>
<Stream id="35983" streamType="3" codec="pgs" index="4" language="English" languageCode="eng" displayTitle="English (PGS)"/>
<Stream id="35984" streamType="3" codec="pgs" index="5" language="English" languageCode="eng" displayTitle="English (PGS)"/>
<Stream id="35985" streamType="3" codec="pgs" index="6" language="English" languageCode="eng" displayTitle="English (PGS)"/>
</Part>
</Media>
<Extras size="0"> </Extras>
</Video>
</MediaContainer>
Thanks Scott.
The XML alone already gives me an indication of what’s happening here.
Notice the subtitles are PGS (Image based).
Image based subtitles must be burned in by the CPU. (no harm so far… right? )
Subtitle burning is a single-threaded operation. (and there’s the pain)
There’s nothing we can do because it’s how the codec itself is written.
Hardware decoding is fine,
Hardware encoding is fine.
The CPU must do the subtitle burning (not too bad)
The CPU must merge the two planes (video plane & subtitle plane) and that’s one thread/core only
The logs will confirm this.
I use MakeMKV and extract to mkv and that’s all I do in the spirit of simplicity. Given that I have had tons of troubles with subtitles never working when they are supposed to, I would like to sort out my subtitle problems in one simple step now that I have two ai title problems.
Given that I’m looking for an easy button going from the BR to a raw mkv, how would you solve this?
I appreciate you taking your time to help me sort this out. Thanks!
It’s a pretty simple shell script.
mkvmerge -o temp.mkv -M -S --no-global-tags --disable-track-statistics-tags "$1"
if [ $? -ne 0 ]; then
echo `date` Bad file: Error \($?\) \"$1\" >> $Logfile
rm -f temp.mkv
else
echo `date` "Keeping: " "$1"
mkvpropedit -s title= temp.mkv
mkvpropedit --edit track:a1 --set language=eng --edit track:v1 --set language=eng temp.mkv
mkvpropedit --edit track:a1 -s name= temp.mkv
fi
Is the intent that I run this on every mkv file that I have? I know I could figure out what it does, but I figure it’s easier to ask so there aren’t any surprises. Thanks!
Yes Scott,
I run them on every OTA file I receive and after each disc I rip.
It’s all part of the process. My OTA files do it automatically.
Ripped files go into a ‘pending’ directory. The NAS has a little job which wakes every 5 minutes and looks for anything new. If I have ripped a disc, it picks it up and verifies it’s clean then runs through FileBot. The output of FileBot is to rename it properly and deposit into the production PMS area
I ran your script on three movies with PGS subtitles and they are still buffering just as frequently. I confirmed the updated XML for these tiles does not include PGS subtitles. What’s my next step?
I think I had other issues going on. The performance issues just seemed to stop. after a couple of reboots.
I have tried your PGS script on the BluRa “Sicario: Day of the Soldado (2018)” ripped with MakeMKV. This movie has significant forced subtitles scenes. I first tried it with a default rip and it didn’t work for subtitles. So I dug deeper. There are six English Subtitles tracks. I only care about English Forced Subtitles. In experimenting with VLC the first subtitle track is for hearing impaired. I forget what it’s called. It’s the one that shows “[DIRE MUSIC PLAYING]” and things like that. The other 5 subtitle tracks are what I want. I have no clue why there are 5 when only one is needed. I tried reripping unselecting the first subtitles track and it still didn’t work. How do you get subtitles to work with or without your script in a turnkey fashion when ripping BRs?
Thanks!
Please elaborate on “Your PGS script” ?