1.15.3.x web playback pegs 1 CPU core at 100%

Server Version#: 1.15.3.835 and 1.15.3.858
Player Version#: Web 3.93.1

I’m seeing weird CPU usage on the server when playing videos from the web client. the “Plex Media Server” process will peg at 100% (seems to be using a single core always) when streaming, both when it uses Direct Stream and Transcoding, although the Server process only peaks out when it is throttling the transcode.

Downgrading to 1.15.2 mitigates the problem, which I find weird. Trying out other clients, like plex media player (both direct play, direct stream and transcode) does not give the same behavior, which makes me believe this is a 1.15.3 bug. The web client doesn’t seem to be updated in between these.

In general it seems like the Plex Media Server process is using less CPU while streaming in 1.15.2 than 1.15.3, even during direct play, but it’s a bit hard to tell.

I turned on debug logging, and looked what was logged during playback, but neither the logging frequency or the content stood out.

1 Like

Some of the corrections recently fixed errors in analysis. Your full ZIP file logs (DEBUG, not VERBOSE) would be needed to see if it’s catching up on that work.

I checked the scanner logs and they showed no activity either. This also correlate 1:1 with playback, if I stop playback, the cpu usage drops to nothing.

It’s also weird that it only seem to affect the web player, any other device doesn’t seem to cause that kind of cpu usage.

Subtitle burning?

Hi, I’m encountering the same error here. Can’t figure out why. I just installed the update, which doesn’t seem to improve anything.

Here is a htop of my server when I’m watching a video from the Web Client (1080p, 15Mbps) : CPU usage around 250/350%, video buffering every 20 seconds.

EDIT : Precision, changing the subtitles burning/disabling the subtitles doesnt improve anything

No subtitle burning. Video is direct streaming, audio is transcoded, subtitle is transcoded.

The exact same video and settings use like 5-20% cpu on 1.15.2.

Please clarify:

subtitle is transcoded

Hardware cannot process subtitles and subtitles are single-threaded operation.
Merging an image-based (PGS / VOBSUB / etc) subtitle into a stream will consume an entire CPU thread.

It’s concerted from srt to webtt or whatever the format that chrome can handle is called. Not burned.

Please do the following.

  1. Verify your logging is set for DEBUG (not VERBOSE)
  2. Recreate the problem with the playback (play for 30 seconds)
  3. Wait 30 seconds after stopping
  4. Settings - Troubleshooting - Download Logs
  5. Get the XML (Hover over item - Get Info - View XML)
  6. Attach both here.

pasting XML looks odd as you do it.
```
paste XML here
```

looks like:

paste XML here
  1. Get the XML (Hover over item - Get Info - View XML)

Not sure what you mean by this. You want the XML from the Plex Transcoder Statistics.log? As I’ve said, it’s not the Plex Transcoder executable using CPU, it’s the Plex Media Server executable.

Is there any way to distribute the logs without uploading them to a public forum?

This definitely has to do with subtitles conversion. Tautulli says “Transcode (SRT -> ASS)” but the plex dashboard says nothing about it. But that makes the Media Server executable eat a full core it looks like.

Even weirder, it’s enough if I collapse the video window in plex desktop, after a few seconds it settles down, until I open up the video again, even though tautulli still says it’s converting the subtitles.

1 Like

Request #2

Please do the following.

  1. Verify your logging is set for DEBUG (not VERBOSE)
  2. Recreate the problem with the playback (play for 30 seconds)
  3. Wait 30 seconds after stopping
  4. Settings - Troubleshooting - Download Logs
  5. Get the XML (Hover over item - Get Info - View XML)
  6. Attach both here.

pasting XML looks odd as you do it.
```
paste XML here
```

looks like:

paste XML here

Haven’t found that thread before, but I do have the same problem, and it only happen when I’m using subs, I’ll grab those logs in a sec, 100% (aka 1 full core) for just subtitle transcoding (not burning) is just too much.

EDIT: Just did exactly what ChuckPA said, but the forum only allow up to 40.000 characters, since it was more than it, I simply uploaded to pastebin.

You attach the ZIP file of the logs
You paste the XML (down to where the Genre / Actor information starts) here.

That’s all.

Pastebin, for as good as it is, isn’t enough info

Oh, that XML, give me a sec.

EDIT: I think that I did it correctly now. Note: I’m using the lastest Plex Pass version available (docker), this bugs occur no matter if I use my own web player or app.plex.tv.

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="3" librarySectionTitle="S&#233;ries" librarySectionUUID="c848dfa9-4f1e-4eb5-857a-d4a5b6f5f453" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1554360427">
<Video ratingKey="15910" key="/library/metadata/15910" parentRatingKey="15906" grandparentRatingKey="15851" guid="com.plexapp.agents.thetvdb://79169/2/4?lang=en" librarySectionTitle="S&#233;ries" librarySectionID="3" librarySectionKey="/library/sections/3" type="episode" title="The Phone Message" titleSort="Phone Message" grandparentKey="/library/metadata/15851" parentKey="/library/metadata/15906" grandparentTitle="Seinfeld" parentTitle="Season 2" contentRating="TV-PG" summary="George blows an invitation upstairs with his latest girlfriend and then when he tries to make restitution he leaves progressively nastier messages on her answering machine. He gets the chance to prevent her from hearing her messages by having Jerry switch the tape out of her machine, while he distracts her. Jerry and his girlfriend have a disagreement about a TV commercial for Dockers, and his telling his friends about their conflict." index="4" parentIndex="2" rating="7.3" viewOffset="584000" lastViewedAt="1554687551" year="1991" thumb="/library/metadata/15910/thumb/1554125774" art="/library/metadata/15851/art/1554125787" parentThumb="/library/metadata/15906/thumb/1554125787" grandparentThumb="/library/metadata/15851/thumb/1554125787" grandparentArt="/library/metadata/15851/art/1554125787" grandparentTheme="/library/metadata/15851/theme/1554125787" duration="1377501" originallyAvailableAt="1991-02-13" addedAt="1554120518" updatedAt="1554125774" chapterSource="media">
<Media id="30956" duration="1377501" bitrate="14693" width="1920" height="1080" aspectRatio="1.78" audioChannels="2" audioCodec="eac3" videoCodec="h264" videoResolution="1080" container="mkv" videoFrameRate="24p" videoProfile="high">
<Part accessible="1" exists="1" id="33950" key="/library/parts/33950/1497989863/file.mkv" duration="1377501" file="/data/TV/Seinfeld/Season 02/Seinfeld.S02E04.The.Phone.Message.1080p.AMZN.WEB-DL.DDP2.0.H.264-NTb.mkv" size="2530005771" container="mkv" videoProfile="high">
<Stream id="109037" streamType="1" default="1" codec="h264" index="0" bitrate="14469" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="23.976" hasScalingMatrix="0" height="1080" level="40" profile="high" refFrames="4" scanType="progressive" width="1920" displayTitle="1080p (H.264)" />
<Stream id="109038" streamType="2" selected="1" default="1" codec="eac3" index="1" channels="2" bitrate="224" language="English" languageCode="eng" audioChannelLayout="stereo" samplingRate="48000" displayTitle="English (EAC3 Stereo)" />
<Stream id="110318" key="/library/streams/110318" streamType="3" selected="1" codec="srt" language="Portugu&#234;s" languageCode="por" format="srt" displayTitle="Portugu&#234;s (SRT External)" />
</Part>
</Media>
<Director id="55825" filter="director=55825" tag="Tom Cherones" />
<Writer id="55823" filter="writer=55823" tag="Larry David" />
<Writer id="55822" filter="writer=55822" tag="Jerry Seinfeld" />
<Extras size="0">
</Extras>
</Video>
</MediaContainer>

Moderator Edit
Log files removed

EDIT: Can you please tell me once you download the logs? I don’t feel confortable letting it widely available online.

Ok…

  1. It’s Docker. I do not know docker well. Docker hides the real host resources.
  2. FFMPEG is not seeing any hardware acceleration which it won’t unless correctly done and supported by the CPU
  3. Also, I see SRT subtitles in the stream. Are the subtitles being used? If so, SRT are text. If the player is set to ALWAYS BURN, the CPU will burn them in using a single thread at 100% to burn those subtitles.
Apr 08, 2019 03:38:34.190 [0x7f03057fa700] DEBUG - TPU: hardware transcoding: final decoder: , final encoder: 
Apr 08, 2019 03:38:34.191 [0x7f03057fa700] DEBUG - Job running: EAE_ROOT='/tmp/pms-4c745f64-589e-4bce-9b76-6552f9ace844/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/a22632d-2172-linux-x86_64/' XDG_CACHE_HOME='/config/Library/Application Support/Plex Media Server/Cache' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'h264' '-codec:1' 'eac3_eae' '-eae_prefix:1' '45wgsozigfn3djy3j6dfkp93_' '-noaccurate_seek' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/data/TV/Seinfeld/Season 02/Seinfeld.S02E04.The.Phone.Message.1080p.AMZN.WEB-DL.DDP2.0.H.264-NTb.mkv' '-noaccurate_seek' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/transcode/Transcode/Sessions/plex-transcode-45wgsozigfn3djy3j6dfkp93-a5afe68e-ff14-4e7d-b7b9-673e7e5aa59a/temp-0.srt' '-filter_complex' '[0:1] aresample=async=1:ocl='\''stereo'\'':osr=48000[0]' '-map' '0:0' '-codec:0' 'copy' '-map' '[0]' '-metadata:s:1' 'language=eng' '-codec:1' 'aac' '-b:1' '256k' '-f' 'dash' '-min_seg_duration' '5000000' '-skip_to_segment' '1' '-time_delta' '0.0625' '-manifest_name' 'http://127.0.0.1:32400/video/:/transcode/session/45wgsozigfn3djy3j6dfkp93/a5afe68e-ff14-4e7d-b7b9-673e7e5aa59a/manifest' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'dash' '-map' '1:s:0' '-metadata:s:0' 'language=por' '-codec:0' 'ass' '-f' 'segment' '-segment_format' 'ass' '-segment_time' '1' '-segment_header_filename' 'sub-header' '-segment_start_number' '0' '-segment_list' 'http://127.0.0.1:32400/video/:/transcode/session/45wgsozigfn3djy3j6dfkp93/a5afe68e-ff14-4e7d-b7b9-673e7e5aa59a/seglist?stream=subtitles' '-segment_list_type' 'csv' '-segment_list_size' '2147483647' '-segment_list_separate_stream_times' '1' '-segment_format_options' 'ignore_readorder=1' 'sub-chunk-%05d' '-start_at_zero' '-copyts' '-vsync' 'cfr' '-y' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/45wgsozigfn3djy3j6dfkp93/a5afe68e-ff14-4e7d-b7b9-673e7e5aa59a/progress'
Apr 08, 2019 03:38:34.191 [0x7f03057fa700] DEBUG - Jobs: Starting child process with pid 468

For as much as folks like Docker, the native app is more portable and has immediate direct access to HW transcoding if it’s available in the CPU.

According to Tautulli, it wasn’t video transcoding, just audio and subs where not burned into video, just converted to ass (iirc).

Also, I think that HW transcode is working fine, I have tested it multiple times before, and on all of them, PlexPy said it was HW transcoding.

Anyway, let’s wait for other users to report back, and see how it goes.

And no, I always set burn options on player to “Image formats only”, or something on those lines

According to your own transcoder logs, there is no hardware acceleration.

Please look at this: TPU: hardware transcoding: final decoder: , final encoder:

It will state VAAPI or nvenc if there is hardware acceleration

TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi

I just tried to transcode something and this showed up, I could grab a new logo if necessary, but HW transcoding is working.

I would need to see the DEBUG logs for this to follow the sequence of events.