Plex playing, buffering, stoppage - rclone mount issues

What is the problem you are having with rclone?

Hello,

I am running a server with rclone and mount with google drive (encrypted) with the mount setup to plex with playback device TX5pro (kodi plex add-on) with internet plan 400mbps/400mbps up-down.

I am using my own api key with google but checking the google drive API, it shows requests 859 less then 24 hours I enabled my google API.
The issue I am having is that when I play a file it either plays great, no buffer, no stoppage. However most of the time its either stopping, buffering or video stops, audio plays or buffering from % wise.

IFrom the plex dashboard I playing the file via direct play for video/audio.
Capture8

I have also noticed where my mount in windows is slow or freezes as its not showing the how much used space indication and results in the plex interface on kodi 'plex' add-on to be unresponsive.

Also to upload files via rclone browser avg speeds of 1.588m/s and sometimes im playing a file via plex and no stoppage, buffer.. its a 1080p file 30gb.. so I don't understand why it's works great and other time it doesn't?

Does anyone know why it says loaded invalid token from the config file?

While I understand topics like these have been discussed or hatched out however If someone can take the time to share and guide I would greatly appreciate it because I am willing to listen, read and learn for this thus I will want to have have my setup like what I hear people who the years have, So thank you in advance.

Update: I am reading this thread however being that its 900+ posts, I hope within here would be tags associated to critical comments which I can read up on. I just hope my setup can relate to someone so I can make the changes and fixes.

Thanks!

What is your rclone version (output from rclone version)

V1.51.0 (rclone browser).

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

Windows server 2008 R2 64-bit
Intel zeon cpu E5-2470 V2 @ 2.40Ghz

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

google drive (gdrivecrypt)

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

<paste command here>

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

rclone config:
[gdrive]
type = drive
client_id =
client_secret =
service_account_file =
token =
root_folder_id =

[gdrivecrypt]
type = crypt
remote = gdrive:/Private
filename_encryption = standard
directory_name_encryption = true
password =
password2 =

this is my mount settings

rclone -v -v -v mount gdrivecrypt: Y:
2020/05/01 21:05:02 DEBUG : rclone: Version "v1.51.0" starting with parameters [
"rclone" "-v" "-v" "-v" "mount" "gdrivecrypt:" "Y:"]
2020/05/01 21:05:02 DEBUG : Using config file from "C:\Users\Administrator.c
onfig\rclone\rclone.conf"
2020/05/01 21:05:03 DEBUG : Encrypted drive 'gdrivecrypt:': Mounting on "Y:"
2020/05/01 21:05:03 DEBUG : Adding path "vfs/forget" to remote control registry
2020/05/01 21:05:03 DEBUG : Adding path "vfs/refresh" to remote control registry

2020/05/01 21:05:03 DEBUG : Adding path "vfs/poll-interval" to remote control re
gistry
2020/05/01 21:05:03 DEBUG : Encrypted drive 'gdrivecrypt:': Mounting with option
s: ["-o" "fsname=gdrivecrypt:" "-o" "subtype=rclone" "-o" "max_readahead=131072"
"-o" "attr_timeout=1" "-o" "atomic_o_trunc" "-o" "uid=-1" "-o" "gid=-1" "--File
SystemName=rclone" "-o" "volname=gdrivecrypt"]
2020/05/01 21:05:03 DEBUG : Encrypted drive 'gdrivecrypt:': Init:
2020/05/01 21:05:03 DEBUG : Encrypted drive 'gdrivecrypt:': >Init:
2020/05/01 21:05:03 DEBUG : /: Statfs:

The first tip I'd have is don't use Windows :slight_smile:

That being said, the one option that speeds up browsing is --dir-cache-time as you want to set that to a higher number as Google Drive supports polling, meaning it can pick up changes on the directory and file system structure.

I set mine to something very large like 1000h.

@VBB has some settings floating around that he finds work very well on Windows. From reading all the posts, I think fuse on Windows is not quite at the same level as it is on Linux.

Depending on where your box is, Direct Play is definitely more sensitive to latency and if the something is a bit slow as the players usually have very small buffers so they tend to be problematic. You'd want to try to find a sweet spot in terms of your sustained bandwidth and what you can play bitrate wise as it'll be spiky to play things.

1 Like

hello,
i use mount on windows and you the same command as you do.

what version of winfsp are you using?

i would run a continuous ping, and when plex slows down, check the ping stats for changes.
ping -t 8.8.8.8

@Animosity022 Thanks for the reply. Yes I have heard that Windows is a bit behind in terms of this however its unfortunate as I cannot find a proper guide as I have read it does work, doesn't work to the level it should.
Where would I update the --dir-cache-time? In the clone config file? Like I said I have grown frustrated and honestly its my lack of understanding but I just want the thing to work EOD. I mean why cant it be Windows-rclone-gdrivecrypt-rclone mount-plex connecting to the mount via Win drive-device-playback smooth :slight_smile:

Anothr question, when I try to play from plex, the command line that is opened for mount run like crazy.. Like repeating the same string for the file I am playing.. Is this standard?

@asdffdsa I have V 1.2.17346 for winfsp.http://www.secfs.net/winfsp/rel/

BTW I didn't install https://nssm.cc/usage with winfsp. Would this be essential?

you are using a very old version of winfsp.
you need to update to the latest stable version v1.6.20027
http://www.secfs.net/winfsp/rel/

make sure the mount is not active when updating.

as for --dir-cache-time, add it your command
rclone mount gdrivecrypt: Y: -vv --dir-cache-time=1000h

no need for nssm at this time.
first get your rclone mount and plex working.

Thanks for you response about updating winfsp. Question when I stop the mount, it is perfectly okay that it says host.unmount failed?

test. is the mount active or not?

Capture11
When I hit Ctrl-c it updates with host.unmount failed. Under file explorer the mount disappears.

As for --dir-cache-time, added it to the command, if you see from the screenshot above.
rclone mount gdrivecrypt: Y: -vv --dir-cache-time=1000h

the mount is not active, so now update winfsp
if you are not sure, then stop the winfsp service and then update winfsp.

Ok installed and updated winfsp however I don't see it running in the background? Does it show up under task manager?

During the install did I have to execute custom settings? Because I just installed it the straightforward way.
From the screenshot its installed.

Capture12

looks good,
now run the rclone mount and test plex.

If I remember correctly @Animosity022 said in a thread I read that Flush isn't a good sign? Please see below. Playing file now..

Update:
Played file and its stopped 0% then on the screen popup displayed that the source to slow etc. and started playing after this. Atm it is playing fine with video/audio in sync,

2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020): >Opendir
: errc=0, fh=0x0
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020): Released
ir: fh=0x0
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: Getattr: fh=0xFFFFFFF
FFFFFFFFF
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020): >Release
dir: errc=0
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: >Getattr: errc=0
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: Getattr: fh=0xFFFFFFF
FFFFFFFFF
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: >Getattr: errc=0
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: Open: flags=0x0
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: OpenFile: flags=O_RDO
NLY, perm=-rwxrwxrw
2020/05/02 07:24:42 DEBUG : Movies Libraries/Movies/Underwater (2020)/Underwater
.2020.BluRay.1080p.REMUX.mkv: Open: flags=O_RDONLY
2020/05/02 07:24:42 DEBUG : Movies Libraries/Movies/Underwater (2020)/Underwater
.2020.BluRay.1080p.REMUX.mkv: >Open: fd=Movies Libra
ries/Movies/Underwater (2020)/Underwater.2020.BluRay.1080p.REM
UX.mkv (r), err=
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: >OpenFile: fd=Movies
Libraries/Movies/Underwater (2020)/Underwater.2020.BluRay.1080p.REMUX.mkv (r), err=
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: >Open: errc=0, fh=0x0

2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: Flush: fh=0x0
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: >Flush: errc=0
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: Getattr: fh=0xFFFFFFF
FFFFFFFFF
2020/05/02 07:24:42 DEBUG : /Movies Libraries/Movies/Underwater (2020)/Underwate
r.2020.BluRay.1080p.REMUX.mkv: Release: fh=0x0

can you post the pop-up?
so you are able to watch video now smoothly?

well video was smooth however lost audio. Like the picture is moving but turned into a silent flim.. :roll_eyes

Update:
The popup message is "source to slow" read rate too low for continuous playback.
Video/Audio is in sync playing fine now.

were you using plex in the past and it worked fine?
or are you using plex for the first time with rclone?

one test might be to add this flag and see what happens.
this will download the entire file to the local cache.
https://rclone.org/commands/rclone_mount/#vfs-cache-mode-full
--vfs-cache-mode=full

how are you viewing the video?

Updated my previous post with the popup message.

In terms of using plex in the past. Yes I have used it in the past however never with rclone mount. I was playing files to plex from local machine (server).

I have a question on the commands. I uninstalled winfsp. but added the command with for --dir-cache-time,
rclone mount gdrivecrypt: Y: -vv --dir-cache-time=1000h

I don't need to add this command every time I start the mount right?

I will do this after I stop the video, https://rclone.org/commands/rclone_mount/#vfs-cache-mode-full
--vfs-cache-mode=full and add it to the command.

I am viewing the video from a android device "TX5Pro with kodi installed. Inside kodi their is a plex add-on. viewing/playing the file with this.

Right now the file is playing good. Everything is in sync but that's right now you know.. Lol.

each time you run a rclone command, you need to add the flags.
has nothing to do with winfsp.

Isn't there a automated process to add these commands?

So at the moment the file is playing smoothly with no issues. Is it perfectly normal for bunch of info the cmd command? Like as the file is playing is updating (debug) extremely fast.

what do you mean to automate?
you want to run the rclone mount each time you boot your computer?
use can use nssm or task scheduler.

there is a rclone browser where you can create tasks.

Well if I have to boot my server from time, would like to automate the command line with those flags per say.
I have rclone browser however I didn't see that there is a option to create tasks. I don't see it.. Basically to create some scripts for these commands.

So the file is playing smoothly. Never stopped since the beginning as I shared. Also checking via plex browser and its direct play for the file as @Animosity022 shared cann be more sensitive.