Apple TV app causing high CPU load on server

Can you share screenshots of the command you ran? It sounds like something may not have worked correctly. There should be some results on any server.

Are you certain you’re looking at a valid DB and have read access ?

The only time you won’t get any records if if you don’t have any media indexed.

I copied this file from my server on docker to my local to run your query.

/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db

The file is 180 MB and I see data in other tables.

May we make arrangements for me to download the DB (zipped) ?

Its rough. The AppleTV is so much better than the Roku.

I would really be looking at the client, not the server or the DB. 100% the AppleTV is making requests that no other client is making. Or its making the same requests, just a huge number of them.

I tested this for a MITM between an iOS client and my server:

The problem is that the tvOS method appears to be brain surgery and a bit more work than I want to put in at the moment.

But you could capture every request these clients are making. I guarantee the AppleTV client is doing something no other client is. Understanding what those request(s) are would tell you what needs to be changed in the DB or more likely changed in the AppleTV app.

This isn’t the first time the AppleTV app needed help. A couple of months ago you guys fixed an issue where it was slow as hell and collections would never load.

The older version of plex server works absolutely fine with latest apple TV client. I have not seen this issue even once.

@ChuckPa When this issue happens, I see this message in the verbose logs 10,000 times per minute on playing a single file on apple TV, no other client is active. Does this look normal to you?

1 Like

Oh, that explains why I don’t see it.

  1. I have a language (ENG) on all my default tracks with only 1 audio track
  2. My default language (globally) is ENG.

May I see the XML of one of those files and would you please tell me your default language ( Setttings - Account ) ?

I cannot reproduce this with the same file if I try again. It just happens randomly. Here is the xml of last file that triggered it.

38206.xml.zip (13.5 KB)

@itsnotv

“System Default” is relying on a lot of things. I suggest setting it.
Screenshot from 2022-01-05 18-45-28

Please notice how I’ve nailed down everything for my account. There is nothing for it to search for

Set it to english, that didn’t fix it. I am still seeing same logs.

<Preferences>
<Setting id="languageOverride" label="Metadata language" summary="Language to use for item metadata such as synopsis and title." type="text" default="" value="" hidden="0" advanced="0" group="" enumValues=":Library default|ar-SA:Arabic (Saudi Arabia)|ca-ES:Catalan|zh-CN:Chinese|zh-HK:Chinese (Hong Kong)|zh-TW:Chinese (Taiwan)|hr-HR:Croatian|cs-CZ:Czech|da-DK:Danish|nl-NL:Dutch|en-US:English|en-AU:English (Australia)|en-CA:English (Canada)|en-GB:English (UK)|et-EE:Estonian|fi-FI:Finnish|fr-FR:French|fr-CA:French (Canada)|de-DE:German|el-GR:Greek|he-IL:Hebrew|hi-IN:Hindi|hu-HU:Hungarian|id-ID:Indonesian|it-IT:Italian|ja-JP:Japanese|ko-KR:Korean|lv-LV:Latvian|lt-LT:Lithuanian|nb-NO:Norwegian Bokmål|fa-IR:Persian|pl-PL:Polish|pt-BR:Portuguese|pt-PT:Portuguese (Portugal)|ro-RO:Romanian|ru-RU:Russian|sk-SK:Slovak|es-ES:Spanish|es-MX:Spanish (Mexico)|sv-SE:Swedish|th-TH:Thai|tr-TR:Turkish|uk-UA:Ukrainian|vi-VN:Vietnamese"/>
<Setting id="useOriginalTitle" label="Use original title" summary="Use the original title for this item regardless of the library language." type="int" default="-1" value="-1" hidden="0" advanced="0" group="" enumValues="-1:Library default|0:No|1:Yes"/>
</Preferences>

May I have a sample of the file ? the first 2-3 MB please ?

Thank you for that.

Here’s what I have.

  1. ATV 4K (2017) v 15.2 (19K53)
  2. PMS 1.25.2.5319
  3. Placed the file in my “Other Videos” section
  4. Opened ATV and browsed to it, monitoring CPU the entire time.
  • 1% CPU as I browsed into the section and saw the video
  • Pressed Play
  • Observed 12.5% CPU utilization while it loaded and started to play
  • CPU usage 1.0 → 1.5% while it played.

There was no abnormal behavior anywhere.

I forgot to ask two things:

  1. After you set your language globally, did you restart the AppleTV app so it can also load those settings?
  2. Were you able to confirm the file you gave me recreates the problem you are seeing ?

Just tried this, I was able to reproduce it after closing the app and rebooting.

As I said before, this is totally random, 1 out of 6 times I play something I get this error. I don’t see it if I repeatedly play the same file (which previously triggered this). I get it with new files, and also old files that I have had in my library for years.

Only apple TV client triggers these thousands of We're going to try to auto-select messages.

Older version does not trigger this issue at all.

Thanks… I will keep trying

1 Like

Really appreciate you taking the time to look into it, I know this is hard to reproduce. I am able to manage by sticking with older version for now.

1 Like

The reason the Apple TV app is causing high CPU load on your server is because by default, Apple TV requests a transcoded stream for EVERY video it streams, instead of using the original quality. So what the CPU has to do is convert and transcode the original file to stream it to the Apple TV, which will put a LOT of load on your CPU, even if it has an integrated GPU.

@kamazadi

This is incorrect.

The AppleTV will request playback based on the Playback quality settings and, subsequent to that, compatibility of the selected media to be played on the TV.

I have many titles which DirectPlay or DirectStream (for the audio).

Sorry but you are incorrect, the ONLY video format that Apple TV plays at original quality are MP4 formats. ANY other video formats are transcoded without ANY option to change otherwise, unless you go into the playback options for the video itself and manually change it to original quality. And that happens EVERY SINGLE TIME you play a video format other than MP4. Its NOT a setting that is preserved, and its a pain in the rear end.

Why Plex coded the Apple TV app to work that way is beyond me, considering the fact that Apple TV is capable of playing MKV files at original quality without transcoding required, but yet your application does not allow for that.

You have to go to settings and set quality to original.
Sadly the default setting of 720mbit transcode is beyond ridiculous.

Source: i have an aTV and direct play almost everything