Rclone to GDrive to Plex - Plex charging on high bitrates streaming

What is the problem you are having with rclone?

Hey :slight_smile:

I would greatly appreciate if someone could help me with my problem(s).
I use Rclone on a dedicated server that downloads and sends on (several) Google Drive, on the same server, there is Plex Media Server whose libraries are mounted on the drive (accessible via rclone).

The main problem (at the moment):

When streaming VERY HIGH bitrates movies (only tried with 60 ~ 75 Mbps 4K REMUX), Plex is charging every few seconds, then play, then charge, etc.
Is it a problem of cache with Rclone ? Thanks a lot for the time you might take answering to me ! :slight_smile:

The specs of the server:
1 To SSD NVMe, 64 Go RAM, 1 Gbps up/down (also 1 Gbps down on my computer -plex media player) and a Ryzen 9 3900x

What is your rclone version (output from rclone version)

rclone v1.53.3

  • os/arch: linux/amd64
  • go version: go1.15.5

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 64 bits focal (last version)

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

The command I use right now (I've tried many things and read a lot on the matter, I haven't seen much difference by changing them...)

rclone mount --vfs-cache-mode full  --vfs-read-ahead 2G --vfs-read-chunk-size-limit off --vfs-cache-max-age 24h --vfs-cache-max-size 650G --dir-cache-time 1000h --log-level INFO --log-file /opt/rclone/logs/rclone.log --poll-interval 15s --allow-other --buffer-size 1G --drive-chunk-size 256M Leo: /leo/ &

Are you direct playing them or transcoding?

1 Like

Direct playing them (original UHD REMUX at 73 Mbps for example), If I try to transcode them to 20 Mbps FHD or 0,2 Mbps it works right away and perfectly.

If you are direct playing, that sounds more like a bandwidth constraint between plex and your player?

Can you run some tests between the two and see?

Full cache mode pretty much takes a lot of rclone out of it as it'll read ahead. I can stream high bitrate without issue but I am Verizon FIOS as well.

I tried to stream it while I was connected to the server with a tunnel SSH (using the web player), and it's working perfectly.
After all, it looks like a Plex issue... weird.

Is my mounting command ligne good, from your perspective ? Can I make it better ?

I would test with a simpler mount:

rclone mount --vfs-cache-mode full --vfs-cache-max-age 24h --vfs-cache-max-size 650G --dir-cache-time 1000h --log-level INFO --log-file /opt/rclone/logs/rclone.log --poll-interval 15s --allow-other Leo: /leo/ &

And since you're using PMP on a PC, you might as well check playback outside of Plex.

1 Like

What do you mean "outside of plex" ? With Kodi (and the plex addon) ?

I mean with a different player, yes. If you're on Windows, try playing directly via Explorer, for example.

I've already tried with Firefox, Chrome and Plex Media Player.

Well, that's why I said outside of Plex, meaning without going through the Plex server at all. Are you able to mount rclone directly on your home PC?

My setup is similar to yours, where I use a dedicated server to run Plex and upload to Drive. On my home PC, I also mount rclone, but I use MPC-HC for playback. I personally don't use Plex, but my friends and family do. I have 500/500 at the house, and absolutely no issues streaming even the largest files. I don't even use cache.

The problem is from plex, I've tried manything, it is working with tunnel SSH and also on the plex apps of my phone, but not on Plex media player... Jesus.

And I was trying to help you optimize your mount for Plex. That is why my very first reply was to try a simpler mount without the huge read-ahead and buffer.

Yes of course, and I thanks you for that :slight_smile:
But indeed, my real problem is not about rclone right now... I have no clue how to fix it.

Hey, I'm having the exact same problem with the Rclone mount and Plex. So I looked up the network traffic on the server with nload. It seems as that Rclone or Plex Media Server is limiting the upload speed to about 25-30 Mbit/s per stream, because the download speed over GDrive is working normally and is getting the full 1 Gbit/s of the servers bandwith. If I start two streams at let them play at the same time it doubles and the upload speed of the server goes up to over 50 Mbit/s. So I don't know how to fix it and would like to know if you found a solution for this problem? :smiley:

hello and welcome to the forum,

rclone and plex will stream downward from gdrive to local plex server
so not sure what you mean about upload speeds?
limiting the upload speed?
and
If I start two streams at let them play at the same time it doubles and the upload speed

rclone will only downstream at whatever speed plex requests.
so if one stream is 25Mb/s and two streams are 50Mb/s, that seems normal.

if you had started a new post, you would have been asked for needed information,


STOP and READ YOUR POST WILL BE REMOVED IF IT IS LOW QUALITY:
Please show the effort you've put in to solving the problem and please be specific -- people are volunteering their time to help you! Low effort posts are not likely to get good answers! DO NOT REDACT any information except passwords/keys/personal info. You should use 3 backticks to begin and end your paste to make it readable. Or use a service such as https://pastebin.com or https://gist.github.com/

What is the problem you are having with rclone?

What is your rclone version (output from rclone version)

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Which cloud storage system are you using? (eg Google Drive)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

Yes, I did a reset of my computer -> it worked. Now I can watch 4K REMUX in a second :smiley:

Hello thanks for welcoming me!
So I'm trying to explain it a little bit better now:

I'm trying to play a video that has a higher bitrate as the 25-30Mbit/s-ish that the server (VPS) is sending to my local Plex Player. Therefore it is buffering every few seconds and makes it unwatchable. I don't know what is limiting me here.

Rclone streams the file from Google Drive to the server with the full bandwidth as it should be, but then the server is only sending me the above mentioned 25-30Mb/s to my local PC. Even though I could get around 100Mb/s to my local Plex Player and the server has and 1Gb/s upload as well..?

You can check this out, I gave more information on reddit.

so the problem is not with rclone itself?

that the problem is between the plex server hosted on a vps and the plex player?

I'm shook.. You are right I think. I tried to upload a video to YouTube using the VPS and it used its upload bandwidth like it should. Then I played a video with a higher bitrate that was on the drive of the VPS and I got the same speeds as with one that was on Google Drive... I really don't know what I can do anymore.. I looked up the internal settings of the Plex Media Server if I had set any limits for uploading but found nothing that could limit it. :frowning: