CPU cranks to 300-600% and overheats when subtitles are turned on

Hey everyone!

So I noticed the other day that my laptop was overheating whenever I was watching video files. I had never had this happen before and it seemed. After some trouble shooting, I realized that this is only happening when I turn subtitles on.

Seems really weird. Has anyone else had this happen? Everything seems fine with subtitles off.

Thanks!

Server Version#:
Player Version#:

Some subtitle formats require transcoding with certain clients so that is whats happening. Look at your Plex dashboard when playing and you’ll see what’s causing the transcode.

Yeah but why does plex need to use every ounce of my processor to do that? Like this is a 2017 i7 macbook pro. I render and edit video files on it all the time and it doesn’t heat up like this ever.

Is there any way to throttle plex from the OS level? Because clearly plex won’t do it itself.

EDIT: Found a way to throttle but that doesn’t fix it. Essentially every time you change the video file or even scrub to a different timecode, the ā€œPlex Trancoderā€ process resets it’s PID.

Have you even looked at your transcoder settings in Plex itself? In the server settings - it might help to try different settings, ie change it from ā€˜Automatic’ and see if there is a difference.

Editing video files in different software has very little to do with Plex or what makes a suitable PMS machine. Try a different form of subtitles is probably the easiest fix.

Not just MAC, Its happening on Windows & Linux too. Subtitles being transcoded from .SRT to .ASS are causing really high CPU usage. Not just a coincidence all OS are seeing this issue. Must be something that was either fixed/broken in one of the latest updates.

1 Like

Hoping for a fix! In my own thread, I had only found out about Chrome, Chromecast and Xbox, but it seems to make no difference which player, as long as it is an srt being transcoded to ass, it kills a core instantly…

Any news on this issue? Still a problem, my i7 8700K was maxed out and running at 100c just transcoding subtitles for Xbox!!! System normally can transcode 6 streams with only 25% cpu! Very bad bug this!

Add some more threads to the pile

Please can we get someone to at least take a look? What made such a big difference after 1.14?

@ChuckPa any update on this issue by chance?

I cannot reproduce. what do I need to use in order to require ASS subtitle output?

This is how I am experiencing it as well. Webapp and Samsung TV client.

Your movie media should only have one source of audio, and that audio should be either AC3 5.1 or DTS 5.1

Steps to reproduce:

  • The leak will not show if you recently updated/re-installed a fresh PMS until your 3rd or 4th media is played (it feels like its building up the leak)
  • If using Plex Web App, use the keyboard arrows back and forth, if using Samsung TV use the remote back and forth.
  • For Plex Web App, start the movie randomly in the middle of its duration, then use the keyboard back arrow to rewind 3x, the first initial leak should show.
  • To confirm the leak, using Tautulli to see if the SRT is being converted to ASS, and that the subtitle is actually showing on the movie.
  • Rewinding more, the leak will increase from its initial CPU usage.
  • Now here this differs from different OS (linux, windows, Mac), but with windows, holding down forward arrow for 2secs or more (forwarding the movie) the leak would disappear or go back to its initial CPU leak that it started before its rise. (Subtitles may or may not show).

Reason I said using keyboard arrows was that I’ve tested using the mouse to manually click on a specific time of the movie, the leak would show, but will not rise (tested on windows).

I’ve done extensive tests to different media, and logged each leak here:

What uses ASS subtitles? I don’t have anything which consumes ASS subtitle format.

For me it’s only Xbox one that seems to need ass subtitles so the server transcodes and uses 100% on all cores and threads so 12 in my case!

For me, that’s a problem. I don’t have or have access to an xbox for testing.
I will see what I can arrange in HQ.

Using Plex Web App (chrome or firefox) choose SRT external subtitle.

The plex web app cannot direct play with AC3 5.1 or DTS 5.1 (ironically it can direct play AAC 5.1)

instead it will be direct streamed with audio converting AC3/DTS 5.1 to a stereo (aac).

Once that happens. the Plex Web App will convert SRT external subtitle to ASS format. With that, the leak will occur where it tries to render the subtitle (showing subs on the media) and gets stuck in an infinite loop.

if using aac stereo audio. it will direct play and use SRT subtitle without changing its format to ASS.

I can confirm this leak happens in Windows and Linux. I did not test this on Mac server as I’m only pointing out the steps to reproduce it as I see the guys here linked it to the same problem.

Apple TV device would use WebVTT same as LG TV.

Samsung TV needs to convert to ASS alongside plex web app if used with AC3/DTS 5.1 as audio source.

if the device source changes the SRT external subtitle to ASS, the leak would occur

Using this file:

<Video ratingKey="114" key="/library/metadata/114" guid="com.plexapp.agents.imdb://tt2872732?lang=en" librarySectionTitle="Movies" librarySectionID="1" librarySectionKey="/library/sections/1" studio="Canal+" type="movie" title="Lucy" contentRating="R" summary="A woman, accidentally caught in a dark deal, turns the tables on her captors and transforms into a merciless warrior evolved beyond human logic." rating="6.7" audienceRating="4.7" viewCount="1" lastViewedAt="1564097739" year="2014" tagline="The average person uses 10% of their brain capacity. Imagine what she could do with 100%." thumb="/library/metadata/114/thumb/1564034709" art="/library/metadata/114/art/1564034709" duration="5360405" originallyAvailableAt="2014-07-25" addedAt="1527442207" updatedAt="1564034709" audienceRatingImage="rottentomatoes://image.rating.spilled" chapterSource="media" primaryExtraKey="/library/metadata/1967" ratingImage="rottentomatoes://image.rating.ripe">
<Media id="114" duration="5360405" bitrate="31352" width="1920" height="1080" aspectRatio="1.78" audioChannels="6" audioCodec="dca-ma" videoCodec="h264" videoResolution="1080" container="mkv" videoFrameRate="24p" audioProfile="ma" videoProfile="high">
<Part accessible="1" exists="1" id="114" key="/library/parts/114/1527442207/file.mkv" duration="5360405" file="/share/movies/Lucy (2014)/Lucy (2014).mkv" size="21009351103" audioProfile="ma" container="mkv" deepAnalysisVersion="3" requiredBandwidths="36391,36032,35556,34863,34283,33767,32656,32220" videoProfile="high">
<Stream id="6199" streamType="1" default="1" codec="h264" index="0" bitrate="27067" language="English" languageCode="eng" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" frameRate="23.976" hasScalingMatrix="0" height="1080" level="41" profile="high" refFrames="4" requiredBandwidths="31526,31254,30810,30120,29600,29084,28286,27955" scanType="progressive" width="1920" displayTitle="1080p (H.264)"/>
<Stream id="6200" streamType="2" selected="1" default="1" codec="dca" index="1" channels="6" bitrate="4284" language="English" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="24" profile="ma" requiredBandwidths="4771,4596,4421,4310,4282,4282,4282,4282" samplingRate="48000" displayTitle="English (DTS-HD MA 5.1)"/>
<Stream id="6201" streamType="3" forced="1" codec="pgs" index="2" bitrate="1" language="English" languageCode="eng" headerCompression="1" requiredBandwidths="9,9,9,9,9,9,9,9" displayTitle="English Forced (PGS)"/>
<Stream id="7876" key="/library/streams/7876" streamType="3" selected="1" forced="1" codec="srt" language="English" languageCode="eng" format="srt" displayTitle="English Forced (SRT External)"/>
</Part>
</Media>

I played using FireFox, with forced English subs enabled. at no point did total CPU utilization exceed 11% (less than 1 full thread of the CPU).

Jul 25, 2019 18:52:31.749 [0x7f232f9ae700] INFO - Plex Media Server v1.16.2.1321-ad17d5f9e - QNAP TVS-1282 x86_64 - build: linux-x86_64 qnap - GMT -04:00
Jul 25, 2019 18:52:31.749 [0x7f232f9ae700] INFO - Linux version: QTS 4.4.1.0978, language: en-US
Jul 25, 2019 18:52:31.749 [0x7f232f9ae700] INFO - Processor Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz

At this point, I question the CPU being used and thermal solution.
Please provide information.

Addendum:

  1. HEVC cannot be processed, in HW, on any -6xxx (SkyLake) processor.
  2. The logs are showing me information I do not understand:
Microsoft PC x64 - build: windows-x86 windows - GMT 03:100:

64 bit processor running on a 32 bit OS installation or 32 bit PMS? Please expand.
(I am Linux, not Windows or Mac)

If its about my build, then its Windows 10 Pro (64bit OS)

The medias I tested are all in H264 with both mkv and mp4 containers.

I have not yet tested forced subtitles as I cannot confirm it (I’ll give it a try on the same test environment used)

The leak will show only when the subtitles are physically present on the media.

For example I’m using English external SRT subtitle, when reaching the end credits, the subtitle will reach it ends and will not be displayed therefore theres no more leak.

That’s why I suggested testing it in the middle of the movie, and rarely would it not show, but rewinding 3x would always show a CPU rise in percentage use.

To catch the bug, use a normal External SRT subtitle (not forced), then play the movie in its middle duration where there is talk (so the subtitle is physically shown for at least 2mins).

Im using tautulli to monitor the stream, if the SRT is transcoded to ASS and the subtitle is shown on the movie played, the leak would occur, using rewind more than 2 times back would increase the leak.

EDIT: I do not mean to hijack the thread, just to point out how to reproduce the bug. Apparently, its not related to any operating system. The bug was raised in Linux section of the forum 3months ago, and I tried it on windows OS, I’m assuming Mac OS guys here confirm the same result.

EDIT 2:
Again the bug is related to SRT being transcoded to ASS subtitle. Using any device player that transcodes to ASS will always hug the cpu and shows the leak. One main device is Samsung TV that does not support SRT (newer models since 2016 and up)

There may be other devices, but these devices were available for me to perform the tests

I tested using the stated steps to reproduce:

  1. Firefox
  2. SRT subtitles.

No overheat.

Do remember, if you are seeking around, especially forward in the file, It has no choice but to rapid-transcode to that time-stamp. There is no easy way to seek in a video file and be exact without pre-computed index markers which Plex doesnt’ do.

Was the Plex Web App (Firefox) converting your DTS 5.1 to stereo?
And was the SRT been converted to ASS?
I do not know the technical parts on when the player needs converting, but try to see if your Firefox is actually using ASS subtitle instead of SRT.

If your browser is being converted to ASS subtitle but there is no server session hugging the CPU usage. I might need to replicate what you have.

Depending on how good your CPU (how many cores/threads) the percentage usage differs, for example I tested out 2 PCs one is Intel NUC skullcanyon with Intel core i7 6770HQ which shows memory leak of using 20% (eventually rising for me upto 70% and stays there) of the processor, and another PC (my gaming rig) that has intel core i7 8700k (overclocked to 4.0ghz) and shows its using around 10% initial memory leak (eventually rising upto 45% and stays there)

It may or may not overheat depends on the build. Both tests I’ve tried with and without HW acceleration.

And also the leak shows its from ā€œPlex Media Serverā€ hugging the CPU not the ā€œTranscodingā€.

When monitoring the CPU you can see them side by side when theres any transcoding done. And you will always see ā€œPlex Media Serverā€ still at top hugging constantly the CPU.

Again this only occur when the server itself is converting the external SRT to ASS for the player.

Plex Web App was used as an easy test available, because if it converts 5.1 audio to stereo, it will also convert SRT to ASS.

Some people did say Xbox also uses ASS subtitle which I never tested. But I can guarantee you Samsung TV will always use ASS subtitle and will show you the leak where the server (not the transcode session) will constantly hug the CPU.

It has more impact on mobile Intel processors (and lower end) than higher end.

PS: To simplify things, try downloading any random SRT subtitle from any site (opensubtitles, subscene etc) and put it in any movie

The CPU utilized: i7-7700
System memory: 32GB

Throughout processing of the movie:

  1. Free memory decreased to 146 MB. Buff/cache increased. This is normal as the 30 GB file was read.
  2. Memory used by the transcoder itself fluctuated between 289 and 359 MB. This is normal.
  3. Now, some 12 hours after testing, current memory utilization on the system is:
[~] # free -m
             total       used       free     shared    buffers     cached
Mem:         32090      25902       6188        321       7005       7331
-/+ buffers/cache:      11565      20524
Swap:        32056        352      31704
[~] # 

What is defined as ā€œMemory Leakā€ ? Linux uses memory-mapped files. It is completely normal for ā€˜free’ to reduce to a low value. When memory is needed, the kernel drops these buffer cache pages instantly. The theory behind this is ā€œwhy have otherwise unused memory in a system sit completely idle when there is a chance it will serve as a read-cache buffer?ā€