Server Version#: 1.22.2.4282
Players: Plex Web and Android TV Shield App
Hardware being run on: 2x e5-2630v2, EVGA GTX 1060 6GB, Files stored on Mirrored ZFS HDD Array, Metadata and app stored on Mirrored SSD Array
Software setup: Ubuntu 20.04 Docker Host, Latest Docker runtimes, Latest Plex Docker Image, Latest NVIDIA container passthrough – essentially latest everything
Network Setup: Host of 500 Down/ 25 Up connection. Plex network settings have a 25 megabit
“Internet Upload Speed” set with remote stream cap set at 12 mbps. Off-site test device is ran on a enterprise connection, 100 Down/Up. All tested at off hours of both host and client. Can assure its not network limitations, have full insight into switch and hardware stack both sides.
TL/DR: When hardware accelerated transcoding is enabled, and the container uses the pass through NVIDIA GPU, the remote stream barely buffers ahead and pauses for buffer constantly. Turning off hardware acceleration and using CPU encoding instead buffers the remote client properly and plays smoothly.
Long Version: I have been fighting this battle for a long time. At first I thought that my remote stream buffering problems were a simple matter of my outbound connection on my docker host. It did not really track, because the outbound bandwidth in the dashboard NEVER saturated the total link (often uses below half of the available 25 mbps on remote 12 mbps streams), but whatever I thought it may have been encryption or services overhead. I also want to point out that I monitor the GPU in NVTOP on the host and know that the encode and transcode hardware and buffers are not choking. I know that it can handle these loads. I transcode h265 with ffmpeg (since plex just does not want to support it) all the time on this hardware at much higher bitrates.
But today, for giggles, I decided just to try out CPU encoding as I have 24 threads to throw at it and I wanted to see if I could perceive any increase in quality from software transcode. It totally fixes remote streams. It buffers ahead drastically more then when hardware accelerated encode is enabled. I want to emphasize NO OTHER SETTING IS CHANGED BESIDES UNCHECKING “USE HARDWARE ACCELERATION WHEN AVAILABLE”. Same host uplink bandwidth. Same remote client bandwidth. Same exact remote quality settings (12 mbps confirmed in dashboard).
This is a tough one to diagnose. It could be as simple as not writing out the ffmpeg nvenc buffers in a timely fashion in the plex backend, who knows. What I do know is this:
- My software stack is not limiting this process
- My hardware stack is not limiting this process
- My network stack is not even close to bandwidth limits
- It must be plex limiting this process
It brings up another question: Why is remote bandwidth not fully saturated to buffer remote clients when it clearly has the headroom to do so? Why would it not fill a defined remote buffer at max transfer speed then fill when a threshold is reached? Why does the encoding source even matter for that equation if both options have a fill rate larger than what is required?
Any thoughts from the engineers on this one? Am happy to ship you anything you need. I want to use my dedicated transcoding hardware. It’s supposed to make all of this easier.