Some help with rclone mount for plex? Buffering everywhere

What is the problem you are having with rclone?

Could someone help me with the configuration? I'm trying to use it remotely via VPS, but I can't reproduce anything ... beffering all the time for direct play, not transcoded. My VPS settings:

CPU Xeon six cores, 16gb RAM, SSD, 400 Mbit/s port, Ubuntu 16.

Here is my Rclone mount I don't know if is good, I just copy and paste from some users...and I don't know what I'm doing wrong, When I had a local server, could play fine, but remotely is so bad...

What is your rclone version (output from rclone version)

rclone v1.52.2

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

Linux ubuntu 16

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)

Paste command here
Description=Mount and cache Google drive to /media/Plex
ExecStartPre=/bin/mkdir -p ${MOUNTTO}
ExecStartPre=/bin/mkdir -p ${LOGS}
ExecStartPre=/bin/mkdir -p ${UPLOADS}
ExecStart=/usr/bin/rclone mount \
  --rc \
  --log-file ${LOGS}/rclone.log \
  --log-level INFO \
  --umask 022 \
  --allow-non-empty \
  --allow-other \
  --fuse-flag sync_read \
  --tpslimit 10 \
  --tpslimit-burst 10 \
  --drive-chunk-size 128M \
  --dir-cache-time=160h \
  --buffer-size=128M \
  --attr-timeout=1s \
  --vfs-read-chunk-size=64M \
  --vfs-read-chunk-size-limit=2G \
  --vfs-cache-max-age=24h \
  --vfs-cache-mode=minimal \
  --cache-db-path=/media/plexcache/ \
  --write-back-cache \
  --cache-dir ${UPLOADS} \
  --poll-interval 1m \
  --config ${RCLONEHOME}/rclone.conf \
  dd: ${MOUNTTO}
ExecStop=/bin/fusermount -u -z ${MOUNTTO}
ExecStop=/bin/rmdir ${MOUNTTO}

#### The rclone config contents with secrets removed.  
<!--  You should use 3 backticks to begin and end your paste to make it readable.   -->

type = drive
scope = drive
token = xxxxxxxxxxxxxxxxxxxxxxx
client_id = xxxxxxxxxxxxxxxxxxxxxxxxxx
client_secret = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
root_folder_id = xxxxxxxxxxxxxx

#### A log from the command with the `-vv` flag  
<!-- You should use 3 backticks to begin and end your paste to make it readable.  Or use a service such as or   -->

Paste log here


  • make sure you have done this -
  • that is a lot of flags for a mount, make sure you need each and every flag, else remove it.
  • almost always, --allow-non-empty is not recommended.
  • based on this flag, --cache-db-path, it seems that you are using a cache backend
    based on your remote dd, you are not using the cache backend?

for a mount used to play media, i use almost none of those flags,
no cache flags, no vfs flags, and i use --read-only

i would remove almost all the flags, and test.

I already have the client Id true I just copied these flags from other useers and trying to make somthing good but most I dont know how really works. Could you sugest some?

i suggest you start with this and test playing a video.

--umask 022
--config ${RCLONEHOME}/rclone.conf
--log-file ${LOGS}/rclone.log
--log-level INFO
1 Like

Only these? Nothing else?

That is the problem, I dont know well about the flags, I would like a recommendation for less buffering

have you tried my suggestion?
i can play 4K video without any of those flags.

each and every flag is documented.

I'll try now and see the results

I've tested with this config:

--allow-other \
--dir-cache-time 160h \
--log-level INFO \
--log-file /var/log/rclone.log \
--poll-interval 15s \
--umask 002 \
--async-read=false \
--drive-chunk-size 16M \
--vfs-read-chunk-size 32M \

Starts fast, but the buffering persists.
I've been thinking, the client ID is the same that I use in my local PC, I mount with this account too, local and in the vps. Maybe do I need to create a new project and use a new client id?

is there a reason you added that flag?

not sure what is causing the buffering.
could be your internet connection?
could be the internet connection of the vps?
could be a setting in plex, such as transcoding?

as a test, skip the vps and plex and all those flags.
mount gdrive on your local computer and play a video.
this is the exact command i use and i can play 4k from gdrive, no flags at all.

rclone mount gcrypt: u:

In other forum a user told me to configure nginx...maybe my location and the vps is causing this buffer. I'm trying to figure out how works.
In my local PC I can stream with VLC directly with no problem, even remux and I dont think is my local connection

not sure what you mean?

so you mounted gdrive on your local pc and play a 4k video using vlc from that mount?

Yes. Or to avoid the windows explorer lag, I can play well via Air Explorer

for the local mount with rclone, what was the rclone command you used to play 4k with vlc?

so it would seem that issue is with the vps

I use this:

--log-level INFO --allow-non-empty --allow-other --fuse-flag sync_read --tpslimit 10 --tpslimit-burst 10 --buffer-size=64m --attr-timeout=5s --vfs-read-chunk-size-limit=2G --vfs-cache-mode=writes

I'm trying now find some tutorials about ngix and test

Could you check my logs and see if something wrong is happening when I play some video?

I'm using these flags now
--dir-cache-time 1000h
--log-level INFO
--log-file /opt/rclone/logs/rclone.log
--poll-interval 15s
--umask 002
--buffer-size 1G
--user-agent animosityapp
--rc-addr :5572
--vfs-read-chunk-size 32M

as i demonstrated the mount command can work just fine with no flags.
there was one warning pacer: low level retry 1/10

i suggest that you contact the tech support of the vps provider

  • who is the vps provider?
  • what do you pay per month?

Is from Contabo and 8,99 EU
But what do I say about this error? What this error means?

this adding this flag and test

But this will download the file when I try to acess it, no?
I think it is some problem with the distance between my local machine and the VPS..I did the test with a complete file downloaded from the VPS and I was unable to play it directly. I'm trying to see if I understand some tutorials related to cloudflare, see if that solves it