Emby playing, buffering, stoppage - rclone mount issues

What is the problem you are having with rclone?

I'm setting up an Emby server with a rclone mounted encrypted Google Drive. There is only one user (this may expand to two in the future) and this is entirely local.

The issue that I'm having is the content plays, but there is very quick buffer (< 1 second) periodically. When my server is further away from the primary router, the buffer occurs every 1-2 seconds. When my server and client connected to the same modem/router, the buffer occurs every 30-ish seconds. I have gigabit internet (up and down). When my server is far away from the primary router, I get about 400Mbps/400Mbps. When my server is connected to the same modem/router I get close to the full speeds.

When I look at the Ethernet tab within Task Manager, I do notice that the buffers always occurs when the "Send" and "Receive" drop down to 0 Mbps for some reason. Whenever there is any data transfer no matter how small, the file plays seamlessly.

I've been primarily testing with my highest bitrate media, a UHD version of The Shining which has an average bitrate of about 80 Mbps (but I believe spikes above 100 Mbps occasionally). When I have the media on a local harddrive, it has able to play just fine.

However, I did notice on lower bitrate media (~50 Mbps), the same occasional buffer occurs. On extremely low bitrate media (~7 Kbps), I don't believe there was any buffering.

I am using my own api key with Google.

Any advice on how to remove this buffering would be wonderful! I've spent a few days reading through the other threads in this forum and I have to say, the support here is great and responses are extremely detailed, which helped me to get my current command. My ultimate goal would be to leave my server further away from my client (to reduce fan noise), but if that's not possible, that's fine as well!.

What is your rclone version (output from rclone version)

rclone v1.52.1

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

Windows 10 Pro
64 bit
i5 4570
8GB Ram

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)

rclone mount gcrypt: X: --dir-cache-time 72h --vfs-read-chunk-size 512M --drive-chunk-size 256M --buffer-size 1024M --timeout 1h

I've been reviewing A LOT of the threads here and pieced this together from Animosity022 (appreciate it!)

The rclone config contents with secrets removed.

[gdrive]
type = drive
client_id = 
client_secret = 
scope = drive
root_folder_id = 
token = 

[gcrypt]
type = crypt
remote = gdrive:
filename_encryption = standard
directory_name_encryption = true
password = 
password2 = 

A log from the command with the -vv flag

https://gist.github.com/qazwsx16/8a47482695313ec0868b27713ac7b7f8

This log is from when my server was further away from my primary router, so it paused every 1-2 seconds.

hello and welcome to the forum

not sure i understand, is the server running emby on wifi or lan?
if lan, when the server is far away, are there any network switches in use?

are you using multiple routers? you write about same modem/router and primary router

perhaps simplify the command and test
rclone mount gcrypt: X:

Great questions! Here is my setup:

Scenario #1 (Ideal):

  • TV (Emby client) is connected directly (ethernet) to Modem/Router #1.
  • Server (Emby server) is connected directly (ethernet) to Router #2.

Scenario #2:

  • TV (Emby client) is connected directly (ethernet) to Modem/Router #1.
  • Server (Emby server) is connected directly (ethernet) to Modem/Router #1.

I do have multiple routers, but the client and server are always connected directly to each router. I try not to use wifi whenever possible.

I'll try that command later today, thank you!

ideal in what way,
ideal in that is the scenario you want to use
or
ideal - as in better buffering performance.

is one router plugged into the other, that one router's wan port is plugged into the other router's lan port?

also, still not understand what this means "When my server is further away", why would distance matter? ethernet cables can be over 300 feet, i know as i made such cables before.

Scenario #1 is ideal in the sense that is what I would like to use, since the server does make some noise and wouldn't want to ruin any movie watching experiences. In terms of better buffering performance, I've noticed currently Scenario #2 is WAY better (buffer ever 30 seconds vs 1-2 seconds).

Ah I should have been more clear, the two routers are connected wirelessly. I wish I could have connected them directly to each other. The two routers are separated by one floor and one wall.

ok, you want the server further away from the client, as the server has a loud fan?

  1. use cardboard to create a sound de-amplifier for the fan, sort of the opposite of this
    https://www.instructables.com/id/Cardboard-Sound-Amplifier/

  2. this flag will download the entire media file before streaming, should not have buffer problems.
    https://rclone.org/commands/rclone_mount/#vfs-cache-mode-full

  3. buy a cheap raspberry pi and run emby or plex on that.

Thank you for the suggestions! I do have an Nvidia Shield lying around that I may try to re-purpose down the road. For the time being, I might use Scenario #2 (connect both to the same router) and use the cardboard idea that you posted.

I do like the vfs-cache-mode-full flag and I'll try that for testing purposes to see if that fixes the issue temporarily. My only concern was for larger media (e.g., the Shining is about 80GB), this would mean about an 80 second load time right?

https://www.almico.com/sfdownload.php

let me know how the cardboarding and flag testing go.

many decades ago, i went to israel, needed money and started to clean apartments in the old city of jerusalem. one customer has a noisy computer, due to a loud fan.
Jerusalem, being a desert like area, dust. i would find dust bunnies under beds and furniture, as i cleaned these houses.
so i knew that the noise from the computer was the fan, and the fan had a lot of dust.
there were some kids watching, as i tried to fix the computer.
so to have fun, i walked around the computer, made a show, of looking and listening, trying to figure out what was going on.
then i banged the computer case, on top of the fan, and the sound went away.
those kids did not speak english but they called me Fonzie.

the moral of the story is that fan might need to be cleaned or replaced.
spritz it with some compressed air or perhaps a small amount of wd-40

This may be an obvious question, but is there a way to specify where to save the cache to? My main drive that has rclone, has about 30GB left, but I have another drive with enough space to play a large file.

https://rclone.org/commands/rclone_mount/#file-caching

Some updates!

So the --vfs-cache-mode full flag did take quite a while since the file was so large, but once it was done, the same issues occurred again (periodic buffering). I thought this was extremely odd since this was all local.

I was using the modem/router combo that my ISP gave me since it was required and was using an additional router as repeat/extension. I had two of these routers from a previous set up, so I changed the modem/router from my ISP to passthrough so it would only use the two routers that I owned.

After this change, I was able to play content without any issues! Using my previous command, I was able to get large files running in about 7 seconds. My next goal is to make the start up time a little shorter. I was reading through this thread: Plex playing, buffering, stoppage - rclone mount issues, and I noticed @VBB was using the following commands for quicker access:

title Rclone Prime
D:\Programs\Rclone\rclone rc vfs/refresh recursive=true --fast-list -v
pause

I'm going to test this out, but just curious if you had any experience with it?

if you read that post, you will see that i contributed to it.

that command has some limited use, as priming can help with updates if you add folders on the remote.
but has nothing at all to do with buffering issues or reduce start up time before a video file starts to play.

yeah, using two routers back to back is called double nat and the source of many problems.
i have installed thousand plus voip phones and dumb'ing down the isp router to a dumb modem is a work common work around.
for example, https://support.ubisoft.com/en-gb/Faqs/000026724/Double-NAT

Ah wow, I think I turn off my brain to usernames as I'm reading through all of these threads. I definitely need to pick your brain more.

Any suggestions to reduce startup times?

sure, pick away!

yeah, i was the one writing about the greatest game of all time, ZORK!
and how to run a .exe on a rclone mount on windows..

so what is the delay before the 4k video of shining starts?
not sure what to do about start up times.
you can

  • Playin' solitaire till dawn with a deck of fifty-one
  • Countin' flowers on the wall
  • Smokin' cigarettes and watchin' Captain Kangaroo

  • do you really neeed videos in 4k?
  • you are using two routers connected over slow wifi.
    i assume that you are using 5Ghz, not 2.4Ghz
    perhaps upgrade to wifi 6

oh no, you have invoked @VBB and here it comes! :upside_down_face:

1 Like

Haha! Well, it would probably help if you had taken a little more time with your username :heart_eyes:

To OP, the priming helps with Plex scans and quick access to files and folders, large ones in particular. It doesn't do anything for streaming.

Like @asdffdsa said, using two routers (and wirelessly on top of that) is not a good option, unless one is configured to be an AP only. But, since you said you're getting 400 Mbps, that's plenty for streaming, if consistent.

My suggestion would also be to use a simple mount command first, to see if that makes any difference. Then you could try my latest @Animosity022 hybrid:

rclone mount --attr-timeout 1000h --dir-cache-time 1000h --poll-interval 0 --rc --read-only --vfs-read-chunk-size 32M -v

Just to add to that, @Animosity022 goal has been to simplify the mount as much as possible, by moving more and more to Rclone defaults. This has also worked great for me. The only differences between his and my mount now are that mine is read only and tweaked for the fastest possible Windows Explorer access.

yes, i agree, tho i do not use windows explorer.

really, and what exactly is VBB as compared to asdffdsa???
and I have a second name of jojothehumanmonkey
and be respectful, i am a hybrid, half human, half monkey, an endangered species registered at the UN protected species list!

:rofl:

I use VBB on all forums, along with the same avatar (as an old school gamer, I wonder if you recognize that game). I'll call you JoJo from now on!

1 Like

outlaws

and to you, I am Sir JoJo

1 Like

Dyin's too good for 'em