Rclone slow streaming

What is the problem you are having with rclone?

Streams take quite a time to load, low bitrate videos (1.2-2 mbps) taking more than 12-15 seconds with a 40mbps connection.

Run the command 'rclone version' and share the full output of the command.

rclone v1.56.0
 os/version: debian bookworm/sid (64 bit)
- os/kernel: 5.15.0-3-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.5
- go/linking: static
- go/tags: none

Which cloud storage system are you using?

Google Drive

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

Description=rclone: Remote FUSE filesystem for cloud storage config 
ExecStart=/usr/bin/rclone mount mydrive: /mnt/mydrive2 \
--allow-other \
--buffer-size 2G \
--allow-non-empty \
--drive-chunk-size 512M \
--vfs-read-chunk-size-limit 0 \
--vfs-read-chunk-size 8M \
--drive-pacer-burst 200 \
--drive-pacer-min-sleep 10ms \
--bwlimit-file 15M \
--vfs-cache-mode writes 


The log file has no errors as such, just normal media playing info.

I don't have high bitrate videos and everything is below 10mbps. I'm sure my internet is a bottleneck (40mbps) but shouldn't 3-4mbps bitrate videos load instantly?

I tried testing on both LAN and through the reverse proxy. I even noticed that files that require transcoding are only processed after a delay almost like the download is taking a while.

The server is an old PC running DietPi (Debian based) , with an i5 6th Gen and LAN connectivity.

The remote drive is encrypted.

Please do advise further.

hello and welcome to the forum,

--- without a debug log, hard to know what exactly is going on
--- might test by adding --vfs-cache-mode=full
--- might test by removing --bwlimit-file 15M
--- might remove --allow-non-empty, as it allows for over-mounting. very rare to needed it.

most rcloners use base their service files on this.
imho, i would mimic this as much as possible, to establish a baseline performance.
homescripts/rclone-drive.service at master · animosity22/homescripts · GitHub

rclone.txt (1.4 MB)

I have attached the log above, sorry for the size, I feel it's a bit too long.

I have made the suggested changed but now it takes even longer to load.

Also, turns out --allow-non-empty is necessary as I got a fatal error without it (mount is not empty).

I'll have a run with what animosity22 uses as well.

First thing I'd remove, if only to test, is --buffer-size 2G. That's highly excessive.

Fatal error: Directory is not empty: /mnt/VaderDrive If you want to mount it anyway use: --allow-non-empty option

as per the rclone docs, the mount folder should be empty, as that creates problems for rclone.
"On Linux/macOS/FreeBSD start the mount like this, where /path/to/local/mount is an empty existing directory"

in any event, not relevant to the main issue of slow streaming.

in the debug log, which media file is slow to start streaming?

Okay, I set it to a very low value and now it loads almost a few seconds faster (placebo?)

Hmm, when I mounted the first time it was an empty directory.

Death Note - Episode 1 I believe, the media file is very small, less than 120MB, yet it took almost 15-20 seconds to start streaming (like it was downloading the whole file I think)

Other media files have been accessed for metadata I guess?

No placebo :slight_smile: I used to mess with buffer size endlessly, but that was very early on when Rclone was new. I haven't had any reason to change it from the default 16MB (no flag) since.

did not find a file name Death Note - Episode 1.
what is the exact full name including file extension of the media file that was slow to start streaming?

and can you post the result of a speed test?

My bad, the exact name is Death Note - 01x01 - Rebirth.mkv

that is a very high ping rate, tho not sure it matters.

how are you playing the media files?
direct from mount using media player or streaming from a local media server.

not an expert with debug logs of rclone mounts,
are you streaming multiple media files at the same time or have some media server scan?

2022/01/31 02:45:24 DEBUG : Movies/The Shawshank Redemption (1994)/The Shawshank Redemption (1994)  [1080p x265 10bit FS95 Joy].mkv: ChunkedReader.Read at 363851776 length 1048576 chunkOffset 360710144 chunkSize 8388608
2022/01/31 02:45:24 DEBUG : Anime/Death Note/Death Note - 01x01 - Rebirth.mkv: ChunkedReader.Read at 520192 length 524288 chunkOffset 0 chunkSize 8388608

It shouldn't, at least not in the 50s. Mine are always in the mid-70s (from my house to my server), and I have no issues. Once you get into the 100s, that's a different story.

GDrive generally has very low latency, so if you're mounting locally, you shouldn't have any problems.

I was only streaming the specified file but I'm guessing it was scanning the others for metadata (A library scan was NOT initiated).

All the media is stored on the cloud, only metadata on the disk.

well, need to figure that out, take a deeper look into the debug logs.

so 100% of the time, streaming is always slow, never, ever plays well?

yep. I mean, once it starts off it's fine, it's just the initial phase you know?

Like it seems to wait for a great part of the media chunk to download before streaming starts.

what is the current rclone mount command?

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