GDrive, Rclone, Plex, Shield stutter


I suspect this is rather a Plex or Shield thing but wanted to try my luck nevertheless. I have a GDrive mounted via rclone. I use unionfs to "mount" a local drive in it as well. Most things play fine with Plex. However on bigger 4K filmes I get constant stutter.

Looking at the bandwidth rclone is using it seems to load things fine. I fiddled around with read-ahead, buffer (vfs-full, cache drive). I use the receommended settings here. I then switched the client to Apple TV and suddenly: no stutter. I copied a test file in question from the rclone mount point to the local directory and see full bandwith is being used. Hence I believe rclone is working nicely. However:

The sepcial combination with the shield (not the 2019er model but the one before without Dolby Vision) has stutters. If I copy the test file to the local Union-location all works well. So it is not a problem with the shield or network performance per se. It only happens in this special combination and this client. Granted: The apple-tv needs direct stream instead of direct play due to audio-transcoding. Stil.. Strange. Any ideas on this?

Let's start with some more info first. What's your Internet speed? What's the version of the Plex client? Up until recently, Shield/Plex combo had some major issues that would result in what you're describing, in particular with 4K TrueHD/Atmos files. Then again, if I understand you correctly, the problem goes away when you play those files locally?

My setup is similar to yours. I have a 2019 Shield, 500/500 connection, remote server with considerable latency and the occasional routing issue (thanks Frontier!), but most of the time I am able to watch 4K remuxes without buffering.

EDIT: Since this is the Rclone forum, please also post your mount command.

Sure. 250 down/40 up.

Plex Server:
Plex client on shield (same problem with Kodi add-on):

rclone mount PD: /data/plex --allow-other --dir-cache-time 1000h --syslog --syslog-facility LOCAL5 --log-level INFO --poll-interval 15s --umask 002 --user-agent="GMount" --rc --cache-dir=/data/vfscache --vfs-cache-mode full --vfs-cache-max-size 820G --vfs-cache-max-age 9999h --vfs-read-ahead 1G --buffer-size 80M --disable-http2 --tpslimit 10 --tpslimit-burst 10 --bind

Yesterday I noticed stuttering with another client as well on the test file in question. It is considerably less than on the shield however. So it might be rclone "related" after all. As you noticed correctly: No problems whatsoever when the file is locally available on the plex server. I can only suspect that as a result the server itself and the connectivity between Plex/Shield is not the problem.

When I look at bandwith consumption on the router while playing I can see bursts between 60-150 Mbit/s in download which would be consistent with the MBit of the testfile. I assume that there are bursts but that is what the read-ahead should be for should it not? When I do not watch the testfile but copy it from the rclone I get a consistent 240-250Mbit bandwidth consumption. So rclone COULD get the file with 250Mbit/s. It (Plex + Rclone) just chooses not to. Which again as long as the read-ahead is filled should not be a problem. But it is in real life...

Maybe it is related to this:
Vfs-read-ahead not working? - Help and Support - rclone forum

I believe that was my first attempt to fix things last year. If it is the same thing: Why is the client (direct play) or the server jumping around instead of reading a consistent stream?

If I were you, I'd start out with a much simpler mount command and go from there. You have lots of flags that are unnecessary, and just for testing I'd also try without cache. Something like this:

rclone mount --attr-timeout 5000h --dir-cache-time 5000h --drive-pacer-burst 200 --drive-pacer-min-sleep 10ms --rc --user-agent ******* -v

EDIT: Looks like you're on Linux, so keep your --allow other and --umask 002 flags, as well as the --bind one :slight_smile:

Not Linux but yes would have to keep them. The rest is more or less in line with what I have found from Animosity22. I need the cache for my use case but will try to reproduce without. Will see what I can find out later on.

Ok. Same result with the small mount. It appears to be client related. Same file, same settings with Plex for Mac (over WLAN): No stutter whatsoever. On Shield: Stutter. Something in the way the Shield reads/requests the information while direct play seems to be different and causes the performance problems...

That's too bad. Does it only happen with particular files? The only ones I've ever had major stuttering with on the Shield are MP4s with Dolby Vision, but that's a known issue.

I stumbled upon a "solution" by accident... Turns out it is network related yet I have not the slightest idea why.

The shield and the Plex server are in different subnets. I had the router/firewall programmed so that the shield can access the plex server directly without NAT. By accident I just happened to disable that rule. So the shield would believe it is external, would go through the public IP which the router in turn then shortcut and did a NAT. So for Plex it looks as if the traffic comes from the router IP (due to NAT). Before you ask: Both networks are classified as LAN. But it does seem to change something in timing or something else. From that moment on: No stutter.

I am curious to find out what the root cause is but frankly I am just happy the problem is gone. :slight_smile:

1 Like

Glad you got it figured out :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.