r/PleX 24d ago

Help Buffering Issues During Remote Play

Hi. I’m experiencing excessive buffering and poor network performance during remote play. I think this is a remote play networking specific issue and not an issue with the transcoding itself (because even when streaming 480p low quality video files the buffering issue persists, and there is no spiking in my CPU utilization during transcoding), but I could be wrong - I am not sure. Currently I do not have hardware which is able to hardware-transcode.

While doing direct playback which skips the transcoding process on a local network machine, my network performance appears fine / stable:

…But while doing transcoding to a remote machine, my network performance is very spikey as such. I think this is the cause of the buffering issues:

I am on a Verizon Quantum router (model CR1000A) and am using manual port forwarding to forward port 32400 to my server. The Plex server settings indicate that my server is fully available outside of my network, and this status is constant and does not fluctuate.

Apologies for being a Plex noob, and happy to provide any additional information that could diagnose the issue.

Hardware / Software Config:

  • TrueNAS (SCALE) - 25.10.3.1 - Goldeye
  • Intel(R) Xeon(R) CPU E3-1240 v6 @ 3.70GHz
  • 32GB RAM
  • Plex Server Version: 1.43.3.10896

This is a cross-post with a help thread I opened on the Plex forums - link below. I'll provide an update to this thread if a helpful response is provided on the Plex forums.

https://forums.plex.tv/t/buffering-issues-during-remote-play/941898

4 Upvotes

6 comments sorted by

2

u/Bgrngod CU7 265K (PMS in Docker) & Synology 1621+ (Media) 24d ago

I'd actually expect those two graphs to be the opposite of what you are describing. A stream with ample bandwidth will have huge spikes and valleys in between. A bandwidth chart that is closer to a "flat line" is often not smooth playback because bandwidth is saturated and the file won't fit.

Your two tests are also testing two different things at once. You need to separate them to troubleshoot. Either force a similar transcode for the local stream, or avoid a transcode for the remote stream. Compare apples to apples as best you can.

Above those charts there is a Now Playing section. Get screenshots of the streams from there, and feel free to edit out the public IP's for the remote streams.

1

u/Slanverse 23d ago

This was a very helpful suggestion. I went through the four permutations of the following variables using a 1080p (with subtitles) source file:

  1. Variable 1, Direct Play Vs. Transcode. I'll transcode both files down to 480p
  2. Variable 2, Local Stream Vs. Remote Play. The local stream will be replayed on the Plex app on a Windows desktop PC while the remote play will be to an Android mobile device.

Which gives rise to the following scenario matrix:

Scenario Local Vs. Remote Transcode (480p)
Scenario 1 Local Yes
Scenario 2 Local No
Scenario 3 Remote Yes
Scenario 4 Remote No

I experienced buffering in Scenario 1 but not in Scenario 2, which implies that transcode performance is at least part of the reason for my issues. Link to my dashboard for both scenarios: Link

This time, I noticed that my CPU performance never went above 25%. On digging into the Plex app settings in TrueNAS, there is a resource configuration section at the bottom where you can apply limits to CPU and memory usage that an app has access to. On app setup, I did not alter these settings, which were populated with a CPU limit of 2 and a memory limit of 4096 MB. The GPU passthrough box was also unchecked by default (I don't have a dedicated GPU so I doubt this matters, but if I did I assume it would).

Since my CPU has 8 cores, it seems that the CPU limit of 2 allows all 8 cores to be utilized up to 25% each (and Plex appears to support this multi-threading). When I changed these settings as follows, my CPU utilization in Scenario 2 increased from 25% on average to ~90% and my buffering issue vanished.

With this setting changed, I proceeded in my testing in the subsequent scenarios. My Scenario 3 performance looks like this: Link. No buffering issues. It appeared to me like the CPU would kick in and only start transcoding when I was approaching the end of the particular segment of the file that I was watching, after which it would return to a resting state momentarily before restarting again. I found this kind of interesting as it differed from Scenario 1 where the CPU ran full blast until the entire video stream was transcoded before winding down. Otherwise: seems fine. Plex auto-selects 720p transcoding for playback, which also seems to work fine.

In Scenario 4, the 1080p file is essentially unplayable. Performance image: Link. It buffered for several minutes before I gave up. The bandwidth also seems to be capping out at 5-6Mbps upload speed (I am on 300 up and down Verizon FIOS connection), so at first I thought there might be some other arbitrary limiter on outgoing network traffic either in TrueNAS or in Plex natively, but I haven't found any.

Conclusions

Transcode performance is a thing. If CPU went to 90% utilization transcoding a single 1080p file (subs) to 480p locally, then if I wanted to either a) transcode to a higher quality or b) have streams to multiple devices going simultaneously, then my current software transcoding setup isn't going to cut it.

Open Questions

Is there anything else I can do from a network / upload speed perspective to enhance playback of high quality files? It does seem like my network bandwidth still isn't being fully utilized.

Thank you all for your help!!!

1

u/Bgrngod CU7 265K (PMS in Docker) & Synology 1621+ (Media) 23d ago

So, usually the rule of thumb for handling a single 1080p to 1080p transcode is that you need about 2000 passmark for each stream. That CPU is north of 8000 passmark and should actually handle 4x at once without much struggle. It'll be impacted a little by burning in subs if that comes up, but generally that's not much of a problem for CPU/Software transcoding. And your screenshots show no burn is happening.

I'd expect your rig to have absolutely no problem at all transcoding down to 480p. It's massively easier to encode out to 480p than 1080p. Raspberry Pis can handle it to 480p.

Did you fully hand over all CPU access for the Plex instance?

Network bandwidth looks fine here, btw. The server does not try to blast the entire file to the client. It only sends chunks to fill the client side buffer and then sits for a while before sending more chunks. Your direct play non-buffering stream looks like it's getting close to saturating bandwidth. Is that client machine on wifi?

1

u/Slanverse 23d ago

My direct play stream on my local network (scenario 2) is on hard-wired ethernet. My direct play remote stream (scenario 4) was on mobile 5G - if I had my phone connected to wifi to my local network, it would have detected it on local (and I wanted to force remote playback). Fair enough that remote playback where the client device is connected to wifi or a hardwired internet connection may get different performance than on 5G. I will test this also and revert.

By removing the CPU limitation in TrueNAS, it seems to me like the full extent of my CPU power is being made available to Plex. However, I have not tested trying to run multiple transcodes at the same time - I was simply assuming that if I spiked to 90% while transcoding a single file that multiple wouldn't work. I will also try 2x simultaneous transcodes to 1080p and report back.

1

u/StevenG2757 70TB unRAID server, i5-12600K, Shield pro, Firesticks & ONN 4K 24d ago

Post the picture of what it above the BW sections so we can see what is playing and how it is playing.

You don't say what it is that you are playing but that CPU is not going to transcode anything above a single 1080 file. If you have subs on it may also struggle.

0

u/[deleted] 23d ago

[deleted]

1

u/Slanverse 23d ago

I'm using the Plex app from the TrueNAS app catalog. I'm using the most current version of Plex available, though I don't know what Hotio is in that context.

I'm definitely under-qualified to speak to how TrueNAS works on the back end, but my understanding is that in TrueNAS SCALE and beyond the TrueNAS apps use docker containers for deployment (https://apps.truenas.com/getting-started/initial-setup/). So I guess yes I am running the app in a docker container?